aboutsummaryrefslogtreecommitdiff
path: root/guix/cpio.scm
Commit message (Collapse)AuthorAge
* cpio: Properly handle Unicode characters in file names.Maxim Cournoyer2023-02-25
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/61722>. * guix/cpio.scm (file->cpio-header): Compute the file name length in bytes rather than in characters. (file->cpio-header*, special-file->cpio-header*): Likewise. (write-cpio-archive): Likewise, and write the file name as UTF-8 bytes, not textually, to avoid encoding it as ISO-8859-1.
* syscalls: Deduplicate device number conversion.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | | | * guix/cpio.scm (device-number, device->major+minor): Move to, and subsequently import from, … * guix/build/syscalls.scm (device-number, device-number->major+minor): …here. Note the slight name change. (mounts): Replace 16-bit open code with a DEVICE-NUMBER call. * gnu/build/linux-boot.scm (device-number): Remove duplicate 16-bit implementation in favour of the one above. (resume-if-hibernated): Reuse DEVICE-NUMBER->MAJOR+MINOR.
* cpio: Fix device number calculation.Tobias Geerinckx-Rice2021-07-04
| | | | | | | | | | | “dev_t in glibc is a 64-bit quantity, with 32-bit major and minor numbers.” — glibc's <bits/sysmacros.h> The "tests/cpio.scm" was failing because (guix cpio) treated it as a 16-bit quantity instead, leading to header mismatches with the GNU cpio reference output. * guix/cpio.scm (device-number, device->major+minor): Use all the bits.
* linux-initrd: Add special-file->cpio-header*.Danny Milosavljevic2020-11-22
| | | | * guix/cpio.scm (special-file->cpio-header*): New public procedure.
* linux-initrd: Handle 'block-special and 'char-special cpio headers as well.Danny Milosavljevic2020-11-22
| | | | | * guix/cpio.scm (make-cpio-header): Handle size correctly for all file types. (mode->type): Add 'block-special, 'char-special.
* linux-initrd: Produce cpio archives with zeroed timestamps, etc.Ludovic Courtès2015-06-24
| | | | | | * guix/cpio.scm (file->cpio-header*): New procedure. * gnu/build/linux-initrd.scm (write-cpio-archive): Add #:file->header argument to 'cpio:write-cpio-archive'.
* Add (guix cpio).Ludovic Courtès2015-06-24
* guix/cpio.scm, tests/cpio.scm: New files. * Makefile.am (MODULES): Add guix/cpio.scm. (SCM_TESTS): Add tests/cpio.scm.