git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: git archive setting user and group
@ 2021-01-22 20:40 Jason Pyeron
  2021-01-22 21:00 ` René Scharfe
  0 siblings, 1 reply; 13+ messages in thread
From: Jason Pyeron @ 2021-01-22 20:40 UTC (permalink / raw)
  To: git

> From: Jason Pyeron <jpyeron@pdinc.us>
> Sent: Friday, January 22, 2021 3:09 PM
> 
> I am about to make a release for logwatch tonight. Historically the files are owned by logwatch in the
> tgz file. When I use git archive it is owned by uid 0, is there an option to set the uid/uname,
> gid/gname owner of the files?

Answer: not at this time, as it is hard coded in the source.

archive-tar.c:
static void prepare_header(struct archiver_args *args,
                           struct ustar_header *header,
                           unsigned int mode, unsigned long size)
{
        xsnprintf(header->mode, sizeof(header->mode), "%07o", mode & 07777);
        xsnprintf(header->size, sizeof(header->size), "%011"PRIoMAX , S_ISREG(mode) ? (uintmax_t)size : (uintmax_t)0);
        xsnprintf(header->mtime, sizeof(header->mtime), "%011lo", (unsigned long) args->time);

        xsnprintf(header->uid, sizeof(header->uid), "%07o", 0);
        xsnprintf(header->gid, sizeof(header->gid), "%07o", 0);
        strlcpy(header->uname, "root", sizeof(header->uname));
        strlcpy(header->gname, "root", sizeof(header->gname));


meh.


^ permalink raw reply	[flat|nested] 13+ messages in thread
* git archive setting user and group
@ 2021-01-22 20:09 Jason Pyeron
  0 siblings, 0 replies; 13+ messages in thread
From: Jason Pyeron @ 2021-01-22 20:09 UTC (permalink / raw)
  To: git

I am about to make a release for logwatch tonight. Historically the files are owned by logwatch in the tgz file. When I use git archive it is owned by uid 0, is there an option to set the uid/uname, gid/gname owner of the files?

--
Jason Pyeron  | Architect
PD Inc        |
10 w 24th St  |
Baltimore, MD |
 
.mil: jason.j.pyeron.ctr@mail.mil
.com: jpyeron@pdinc.us
tel : 202-741-9397




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-01-23  5:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 20:40 git archive setting user and group Jason Pyeron
2021-01-22 21:00 ` René Scharfe
2021-01-22 21:13   ` Jason Pyeron
2021-01-22 21:39   ` Konstantin Ryabitsev
2021-01-22 22:02     ` Jason Pyeron
2021-01-22 22:28     ` Ævar Arnfjörð Bjarmason
2021-01-23  1:05     ` brian m. carlson
2021-01-23  4:58       ` Jeff King
2021-01-23  5:16         ` Konstantin Ryabitsev
2021-01-23  5:11       ` Konstantin Ryabitsev
2021-01-22 22:29   ` Junio C Hamano
2021-01-22 22:51     ` Jason Pyeron
  -- strict thread matches above, loose matches on Subject: below --
2021-01-22 20:09 Jason Pyeron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).