Re: [Rpm-maint] [rpm-software-management/rpm] Reserving space in the signature header (#183)

2017-03-28 Thread Jeff Johnson
Ah, you have added RPMSIGTAG_RESERVEDSPACE already which I was not expecting.

The (minor but annoying problems) with the assignment to 1008 is that 
RPMSIGTAG_RESERVEDSPACE collides with RPMTAG_INSTALLTIME, and will not sort 
correctly to the end of an immutable region data section as a "free space" tag 
through headerReload-like operations if any other RPMSIGTAG_FOO is defined. 
Meanwhile -- because of the tagno assignment collisions between signature and 
metadata headers -- its rather unlikely that any other RPMSIGTAG_FOO 
assignments will ever be needed.

The functionally equivalent RPMTAG_SIGPADDING was assigned 0x3fff for 
uniqueness and to permit assigned metadata tags (e.g. RPMTAG_PUBKEYS) to be 
more easily moved between signature and metadata headers without explicit 
remapping.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/183#issuecomment-289818402___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Reserving space in the signature header (#183)

2017-03-28 Thread Jeff Johnson
My bad for not noticing.

Good that padding has been added by adding (apparently) 0x1000 to the data size:
`0060: 8ead e801    0006  1074  ...t`

Adding a "free space" tag (as @rpm5.org) provides an indication that the 
signature header is padded.

Meanwhile, the metadata header is not aligned on (say) a 0x1000 offset from 
beginning of file
`
1120:          
1130:    003e  0007  ffa0  ...>
1140:  0010   8ead e801    
1150:  0039  437e  003f  0007  ...9..C~...?
1160:  436e  0010  0064  0008  ..Cn...d
`

Conventionally using a known offset would make mmap and HTTP byte ranges easier 
to use, and
its a bit easier to remember 4096 (or 0x1000) than it is to remember 4424 (ox 
0x1148).

But having some constant offset is better than rewriting rpm package files.

(aside)
Adding padding between the metadata header and the payload might also be 
attempted to align the payload on a page boundary might be useful too.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/183#issuecomment-289805262___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Reserving space in the signature header (#183)

2017-03-27 Thread Panu Matilainen
Closed #183.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/183#event-1017880476___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Reserving space in the signature header (#183)

2017-03-27 Thread Panu Matilainen
We've had that for almost three years now so don't bother.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/183#issuecomment-289661326___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint