Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
abuild
Commits
7ac5bd33
Commit
7ac5bd33
authored
Dec 30, 2012
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkapk: new tool
Tool to help find ABI breakages in package upgrades
parent
85cd8c96
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
1 deletion
+76
-1
.gitignore
.gitignore
+1
-0
Makefile
Makefile
+1
-1
checkapk.in
checkapk.in
+74
-0
No files found.
.gitignore
View file @
7ac5bd33
...
...
@@ -8,3 +8,4 @@ newapkbuild
abump
abuild-tar
apkgrel
checkapk
Makefile
View file @
7ac5bd33
...
...
@@ -12,7 +12,7 @@ LUA_VERSION = 5.1
LUA_SHAREDIR
?=
$(prefix)
/share/lua/
$(LUA_VERSION)
/
SCRIPTS
:=
abuild buildrepo abuild-keygen abuild-sign newapkbuild
\
abump apkgrel ap buildlab apkbuild-cpan
abump apkgrel ap buildlab apkbuild-cpan
checkapk
USR_BIN_FILES
:=
$(SCRIPTS)
abuild-tar abuild-sudo
SAMPLES
:=
sample.APKBUILD sample.initd sample.confd
\
sample.pre-install sample.post-install
...
...
checkapk.in
0 → 100644
View file @
7ac5bd33
#!/bin/sh
die
()
{
echo
"
$@
"
>
&2
exit
1
}
msg
()
{
echo
"
$@
"
}
have_abuild_conf
=
for
conf
in
/etc/abuild.conf ~/.abuild/abuild.conf
;
do
if
[
-f
"
$conf
"
]
;
then
.
$conf
&&
have_abuild_conf
=
yes
fi
done
[
-z
"
$have_abuild_conf
"
]
&&
die
"no abuild.conf found"
if
!
[
-f
APKBUILD
]
;
then
die
'This must be run in the directory of a built package.'
fi
.
./APKBUILD
startdir
=
"
$PWD
"
tmpdir
=
$(
mktemp
-d
-t
checkpkg-script.XXXXXX
)
cd
"
$tmpdir
"
||
die
"Failed to create temp dir"
for
i
in
$pkgname
$subpackages
;
do
_pkgname
=
${
i
%
:
*
}
pkg
=
${
_pkgname
}
-
$pkgver
-r
$pkgrel
pkgfile
=
${
pkg
}
.apk
repo
=
${
startdir
##*/
}
for
filepath
in
"
$PKGDEST
"
/
$pkgfile
"
$REPODEST
"
/
$repo
/
$pkgfile
"
$startdir
"
/
$pkgfile
;
do
if
[
-f
"
$filepath
"
]
;
then
break
fi
done
[
-f
"
$filepath
"
]
||
die
"could not find
$pkgfile
"
# generate a temp repositories file with only the http repos
grep
^http: /etc/apk/repositories
>
$tmpdir
/repositories
oldpkg
=
$(
apk fetch
--repositories-file
$tmpdir
/repositories
--simulate
2>&1 |
sed
's/^Downloading //'
)
if
[
"
${
oldpkg
}
"
=
"
${
pkg
}
"
]
;
then
die
"The built package (
$_pkgname
) is the one in the repo right now!"
fi
apk fetch
--repositories-file
$tmpdir
/repositories
--stdout
$_pkgname
\
|
tar
-zt
|
grep
-v
'^\.SIGN\.'
|
sort
>
filelist-
$_pkgname
-old
\
||
die
"Failed to download old pkg. Maybe run 'apk update'?"
tar
-ztf
"
$filepath
"
|
grep
-v
'^\.SIGN\.'
|
sort
>
"filelist-
$_pkgname
"
diff
-u
"filelist-
$_pkgname
-old"
"filelist-
$_pkgname
"
if
diff
"filelist-
$_pkgname
-old"
"filelist-
$_pkgname
"
|
grep
'\.so'
>
/dev/null 2>&1
;
then
mkdir
-p
pkg
cd
pkg
tar
-zxf
"
$filepath
"
>
/dev/null
diff
"../filelist-
$_pkgname
-old"
"../filelist-
$_pkgname
"
|
awk
'/>.*\.so/{$1 = ""; print $0}'
|
while
read
i
;
do
echo
"
${
i
}
: "
"
$(
objdump
-p
"
$i
"
|
grep
SONAME
)
"
done
cd
..
else
msg
"No soname differences for
$_pkgname
."
fi
done
msg
"Files saved to
$tmpdir
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment