aboutsummaryrefslogtreecommitdiff
path: root/fs/tar/tar.mk
Commit message (Collapse)AuthorAgeFilesLines
* fs: don't use := when not neededGravatar Yann E. MORIN2019-10-271-1/+1
| | | | | Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* fs/tar: explicitly set extended header values to ensure binary reproducibilityGravatar Atharva Lele2019-07-141-0/+3
| | | | | | | | | | | | | | | | | | Since we use --xattrs-include='*' to include all extended attributes, tar creates a PAX formatted archive. The archive metadata captures atime and ctime of files. To fix this, GNU recommends that we pass this added argument to tar to create binary reproducible packages. Setting of mtime is handled in fs/common.mk using touch on all files. Diffoscope output pre-change: https://gitlab.com/snippets/1871111 Diffoscope output after change is blank i.e. binary reproducibile rootfs is created. GNU Recommendation: https://www.gnu.org/software/tar/manual/tar.html#SEC147 Signed-off-by: Atharva Lele <itsatharva@gmail.com> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* fs/tar: add support for xattrs (thus capabilties)Gravatar Yann E. MORIN2018-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | By default, tar will not include any extended attribute (xattr) when creating archives, and thus will not store capabilties either (as they are stored in the xattr 'security.capability'). Using option --xattrs is enough to create a tarball with all the xattrs attached to a file. However, extracting all xattrs from a tarball requires that --xattrs-include='*' be used. This is not symetric (but on purpose, as per the documentation), and so is confusing to some. So, we use --xattrs-include='*' to create the archive, so as to be explicit that we want all xattrs to be stored. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package/pkg-generic: handle host-tar as an extract dependencyGravatar Thomas Petazzoni2018-03-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the host-tar dependency handling from DEPENDENCY_HOST_PREREQ to an extract dependency. To achieve that, check-host-tar.mk fills in the BR2_TAR_HOST_DEPENDENCY variable with host-tar if building a host-tar is needed. The name BR2_TAR_HOST_DEPENDENCY has been chosen because it matches the name BR2_CMAKE_HOST_DEPENDENCY already used in check-host-cmake.mk. The BR2_TAR_HOST_DEPENDENCY is added to all packages, except host-tar itself (obviously) and host-skeleton, because we depend on host-skeleton to install host-tar properly in HOST_DIR. In addition, we modify tar.mk to explicitly build host-tar without ccache: since ccache source code is available as a tarball, ccache will obviously depend on host-tar if the system tar is insufficient. Finally, to make things really clean, we also add $(BR2_TAR_HOST_DEPENDENCY) to the dependencies of the tar filesystem format, since it requires tar, so we'd better make sure we have a suitable tar. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* fs: make it behave a bit more like the package infraGravatar Yann E. MORIN2018-01-031-1/+1
| | | | | | | | | | | | | | Currently, to register a filesystem, one has to call: $(eval $(call ROOTFS_TARGET,blabla)) This is very unlike the package infrastructure, where the name of the package is automatically guessed by the infra. It turns out that we can now do that for the filesystem infra too. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* fs/tar: make --no-recursion effectiveGravatar Baruch Siach2016-12-281-1/+1
| | | | | | | | | | The tar --no-recursion option is position sensitive. It only affects following file listing options. Move --no-recursion before the -T option to make it effective. This fixes duplication of entries in the generated rootfs.tar archive. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* fs/tar: make results reproducibleGravatar Jérôme Pouiller2016-11-231-1/+2
| | | | | | | | | In order to make tar images reproducible, force files order in tarball. This work was sponsored by `BA Robotic Systems'. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* fs/tar: support passing long options to tarGravatar Frank Hunleth2016-06-251-1/+1
| | | | | | | | | Move TAR_OPTS so that long options (or any option with an initial '-') may be passed to tar. Since TAR_OPTS is at the front of the list, single letter options still work. Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* fs/tar: only store numeric uid/gidGravatar Yann E. MORIN2015-02-191-1/+1
| | | | | | | | | | | | If a target user is asigned a UID (e.g. 1000) that happens to also exist on the build machine, tar will happily store the username for that user. This can be seen by some as potential information disclosure. Instruct tar to just store the numeric uid/gid. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package: indentation cleanupGravatar Jerzy Grzegorek2014-10-231-1/+1
| | | | | Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* fs/tar: use qstrip to clean up build outputGravatar Thomas De Schampheleire2014-05-281-1/+1
| | | | | | | | | | | | | | When using the tar filesystem method, the build output shows at the end: echo " tar -c""f <br>/output/images/rootfs.tar -C <br>/output/target ." >> <br>/output/build/_fakeroot.fs The inner set of quotes can be easily removed by properly stripping the tar options (coming from the buildroot configuration). Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Acked-by: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* fix white spacesGravatar Jerzy Grzegorek2013-07-201-1/+1
| | | | | Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Normalize separator size to 80Gravatar Jerzy Grzegorek2013-06-071-2/+2
| | | | | Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* fs/common.mk: delay evaluation of variablesGravatar Arnout Vandecappelle (Essensium/Mind)2013-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | This makes things easier to understand and more consistent with the pkg-infra. For example, it removes the need for '$$@' in the CMD variables of fs/*/*.mk. It also makes it possible to update the variables later, e.g. in the package override file. It also makes sure that the date will be recorded correctly in Yann E. Morin's patch that logs the MESSAGE macros to a file. The fs/*/*.mk must be updated as well because the '$@' shouldn't be quoted anymore in the CMD variables or the hooks. The $(eval ...) for the dependencies is redundant, because the $(ROOTFS_TARGET) variable is already eval'd. Note that it is only redundant if the evaluation of the uses of the variable is also delayed. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Coherent naming for .mk files in fs/Gravatar Thomas Petazzoni2010-04-091-0/+13
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>