sourceipk: do not dereference symlinks when packaging data to avoid breakage
PATCH v2 1/1 sourceipk: do not dereference symlinks when packaging data to avoid breakage
From: Denys Dmytriyenko <[email protected]>
* Preserve the sources in its original state, even if there are broken symlinks.
* Process patches/ directory to dereference patch files there before packaging.
--- meta-arago-distro/classes/sourceipk.bbclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
meta-arago-distro/classes/sourceipk.bbclass +9 -1
@@ -160,6 +160,14 @@ sourceipk_do_create_srcipk() { tar -C ${SRCIPK_SRC_DIR} -cO $excludes . | tar -C $tmp_dir/${SRCIPK_INSTALL_DIR} -xpf - fi + # Fix up patches/ directory to contain actual patches instead of symlinks + if [ -e $tmp_dir/${SRCIPK_INSTALL_DIR}/patches ] + then + mv $tmp_dir/${SRCIPK_INSTALL_DIR}/patches $tmp_dir/${SRCIPK_INSTALL_DIR}/patches-links + cp -rL $tmp_dir/${SRCIPK_INSTALL_DIR}/patches-links $tmp_dir/${SRCIPK_INSTALL_DIR}/patches + rm -rf $tmp_dir/${SRCIPK_INSTALL_DIR}/patches-links + fi + if [ ${SRCIPK_INCLUDE_EXTRAFILES} != "0" ] then sourceipk_create_readme $tmp_dir/${SRCIPK_INSTALL_DIR}/
@@ -167,7 +175,7 @@ sourceipk_do_create_srcipk() { fi #Write the data tarball - tar -C $tmp_dir --owner=0 --group=0 -chzf $srcipk_dir/data.tar.gz . + tar -C $tmp_dir --owner=0 --group=0 -czf $srcipk_dir/data.tar.gz . # Create the debian-binary file echo "2.0" > $srcipk_dir/debian-binary
Signature · 1 line
1.8.3.2
My mail must be acting up since I didn't get this patch until after I sent my version.
I can verify that it works since it's almost identical to the patch I sent :)
Quoted 57 lines
-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Denys Dmytriyenko
Sent: Monday, September 23, 2013 7:38 PM
To: [email protected]
Subject: [meta-arago] [PATCHv2] sourceipk: do not dereference symlinks when packaging data to avoid breakageFrom: Denys Dmytriyenko <[email protected]>
* Preserve the sources in its original state, even if there are broken symlinks.
* Process patches/ directory to dereference patch files there before packaging.Signed-off-by Denys Dmytriyenko <[email protected]>--- meta-arago-distro/classes/sourceipk.bbclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)meta-arago- renamed from meta-arago-distro/classes/sourceipk.bbclass +0
-0distro/classes/sourceipk.bbclass
index 1ea0577..dbe0b70 100644meta-arago-distro/classes/sourceipk.bbclass +0
-0@@ -160,6 +160,14 @@ sourceipk_do_create_srcipk() { tar -C ${SRCIPK_SRC_DIR} -cO $excludes . | tar -C$tmp_dir/${SRCIPK_INSTALL_DIR} -xpf -
fimeta-arago-distro/classes/sourceipk.bbclass +4
-0+ # Fix up patches/ directory to contain actual patches instead of symlinks + if [ -e $tmp_dir/${SRCIPK_INSTALL_DIR}/patches ] + then + mv $tmp_dir/${SRCIPK_INSTALL_DIR}/patches$tmp_dir/${SRCIPK_INSTALL_DIR}/patches-links
+ cp -rL $tmp_dir/${SRCIPK_INSTALL_DIR}/patches-links
$tmp_dir/${SRCIPK_INSTALL_DIR}/patchesmeta-arago-distro/classes/sourceipk.bbclass +3
-0+ rm -rf $tmp_dir/${SRCIPK_INSTALL_DIR}/patches-links + fi + if [ ${SRCIPK_INCLUDE_EXTRAFILES} != "0" ] then sourceipk_create_readme $tmp_dir/${SRCIPK_INSTALL_DIR}/ @@ -167,7 +175,7 @@
sourceipk_do_create_srcipk(){
fi#Write the data tarball
meta-arago-distro/classes/sourceipk.bbclass +1
-2- tar -C $tmp_dir --owner=0 --group=0 -chzf $srcipk_dir/data.tar.gz . + tar -C $tmp_dir --owner=0 --group=0 -czf $srcipk_dir/data.tar.gz . # Create the debian-binary file echo "2.0" > $srcipk_dir/debian-binary --1.8.3.2
_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago