Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devtools
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
archlinux
devtools
Commits
cecd2577
Commit
cecd2577
authored
13 years ago
by
Pierre Schmitz
Browse files
Options
Downloads
Patches
Plain Diff
Add script to move packages between [extra] and [community]
parent
82dcc19f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
Makefile
+8
-1
8 additions, 1 deletion
Makefile
crossrepomove.in
+86
-0
86 additions, 0 deletions
crossrepomove.in
with
95 additions
and
1 deletion
.gitignore
+
1
−
0
View file @
cecd2577
...
...
@@ -14,3 +14,4 @@ mkarchroot
rebuildpkgs
zsh_completion
find-libdeps
crossrepomove
This diff is collapsed.
Click to expand it.
Makefile
+
8
−
1
View file @
cecd2577
...
...
@@ -12,7 +12,8 @@ BINPROGS = \
lddd
\
finddeps
\
rebuildpkgs
\
find-libdeps
find-libdeps
\
crossrepomove
SBINPROGS
=
\
mkarchroot
\
...
...
@@ -59,6 +60,10 @@ ARCHBUILD_LINKS = \
gnome-unstable-i686-build
\
gnome-unstable-x86_64-build
CROSSREPOMOVE_LINKS
=
\
extra2community
\
community2extra
all
:
$(BINPROGS) $(SBINPROGS) bash_completion zsh_completion
edit
=
sed
-e
"s|@pkgdatadir[@]|
$(
DESTDIR
)$(
PREFIX
)
/share/devtools|g"
...
...
@@ -82,6 +87,7 @@ install:
install
-m0644
${
CONFIGFILES
}
$(
DESTDIR
)$(
PREFIX
)
/share/devtools
for
l
in
${
COMMITPKG_LINKS
};
do
ln
-sf
commitpkg
$(
DESTDIR
)$(
PREFIX
)
/bin/
$$
l
;
done
for
l
in
${
ARCHBUILD_LINKS
};
do
ln
-sf
archbuild
$(
DESTDIR
)$(
PREFIX
)
/bin/
$$
l
;
done
for
l
in
${
CROSSREPOMOVE_LINKS
};
do
ln
-sf
crossrepomove
$(
DESTDIR
)$(
PREFIX
)
/bin/
$$
l
;
done
ln
-sf
find-libdeps
$(
DESTDIR
)$(
PREFIX
)
/bin/find-libprovides
install
-Dm0644
bash_completion
$(
DESTDIR
)
/etc/bash_completion.d/devtools
install
-Dm0644
zsh_completion
$(
DESTDIR
)$(
PREFIX
)
/share/zsh/site-functions/_devtools
...
...
@@ -93,6 +99,7 @@ uninstall:
for
f
in
${
CONFIGFILES
};
do
rm
-f
$(
DESTDIR
)$(
PREFIX
)
/share/devtools/
$$
f
;
done
for
l
in
${
COMMITPKG_LINKS
};
do
rm
-f
$(
DESTDIR
)$(
PREFIX
)
/bin/
$$
l
;
done
for
l
in
${
ARCHBUILD_LINKS
};
do
rm
-f
$(
DESTDIR
)$(
PREFIX
)
/bin/
$$
l
;
done
for
l
in
${
CROSSREPOMOVE_LINKS
};
do
rm
-f
$(
DESTDIR
)$(
PREFIX
)
/bin/
$$
l
;
done
rm
$(
DESTDIR
)
/etc/bash_completion.d/devtools
rm
$(
DESTDIR
)$(
PREFIX
)
/share/zsh/site-functions/_devtools
rm
-f
$(
DESTDIR
)$(
PREFIX
)
/bin/communityco
...
...
This diff is collapsed.
Click to expand it.
crossrepomove.in
0 → 100644
+
86
−
0
View file @
cecd2577
#!/bin/bash
m4_include
(
lib/common.sh
)
scriptname
=
${
0
##*/
}
if
[[
-z
$1
]]
;
then
echo
'Usage: '
$scriptname
' [pkgbase]'
exit
1
fi
pkgbase
=
"
${
1
}
"
packages_svn
=
'svn+ssh://gerolde.archlinux.org/srv/svn-packages'
packages_server
=
'gerolde.archlinux.org'
community_svn
=
'svn+ssh://aur.archlinux.org/srv/svn-packages'
community_server
=
'aur.archlinux.org'
mirror
=
'http://mirrors.kernel.org/archlinux'
case
$scriptname
in
extra2community
)
source_svn
=
"
${
packages_svn
}
"
target_svn
=
"
${
community_svn
}
"
source_server
=
"
${
packages_server
}
"
target_server
=
"
${
community_server
}
"
source_repo
=
'extra'
target_repo
=
'community'
;;
community2extra
)
source_svn
=
"
${
community_svn
}
"
target_svn
=
"
${
packages_svn
}
"
source_server
=
"
${
community_server
}
"
target_server
=
"
${
packages_server
}
"
source_repo
=
'community'
target_repo
=
'extra'
;;
*
)
die
"Couldn't find configuration for
$scriptname
"
;;
esac
setup_workdir
pushd
$WORKDIR
>
/dev/null
msg
"Downloading sources for
${
pkgbase
}
"
svn
-q
checkout
-N
"
${
target_svn
}
"
target_checkout
mkdir
-p
"target_checkout/
${
pkgbase
}
/repos"
svn
-q
export
"
${
source_svn
}
/
${
pkgbase
}
/trunk"
"target_checkout/
${
pkgbase
}
/trunk"
||
die
.
"target_checkout/
${
pkgbase
}
/trunk/PKGBUILD"
msg
"Downloading packages for
${
pkgbase
}
"
for
_arch
in
${
arch
[@]
}
;
do
if
[[
"
${
_arch
[*]
}
"
==
'any'
]]
;
then
repo_arch
=
'x86_64'
else
repo_arch
=
${
_arch
}
fi
for
_pkgname
in
${
pkgname
[@]
}
;
do
fullver
=
$(
get_full_version
$_pkgname
)
# FIXME: this only works with .xz packages
ssh
"
${
target_server
}
"
"cd staging/
${
target_repo
}
curl -O
${
mirror
}
/
${
source_repo
}
/os/
${
repo_arch
}
/
$_pkgname
-
$fullver
-
${
_arch
}
.pkg.tar.xz
curl -O
${
mirror
}
/
${
source_repo
}
/os/
${
repo_arch
}
/
$_pkgname
-
$fullver
-
${
_arch
}
.pkg.tar.xz.sig"
||
die
done
done
msg
"Adding
${
pkgbase
}
to
${
target_repo
}
"
svn
-q
add
"target_checkout/
${
pkgbase
}
"
svn
-q
propset svn:keywords
'Id'
"target_checkout/
${
pkgbase
}
/trunk/PKGBUILD"
svn
-q
commit
-m
"
${
scriptname
}
: Moving
${
pkgbase
}
from
${
source_repo
}
to
${
target_repo
}
"
target_checkout
pushd
"target_checkout/
${
pkgbase
}
/trunk"
>
/dev/null
archrelease
"
${
arch
[@]/#/
$target_repo
-
}
"
||
die
popd
>
/dev/null
ssh
"
${
target_server
}
"
'/arch/db-update'
||
die
msg
"Removing
${
pkgbase
}
from
${
source_repo
}
"
for
_arch
in
${
arch
[@]
}
;
do
ssh
"
${
source_server
}
"
"/arch/db-remove
${
source_repo
}
${
_arch
}
${
pkgbase
}
"
done
svn
-q
checkout
-N
"
${
source_svn
}
"
source_checkout
svn
-q
up
"source_checkout/
${
pkgbase
}
"
svn
-q
rm
"source_checkout/
${
pkgbase
}
"
svn
-q
commit
-m
"
${
scriptname
}
: Moving
${
pkgbase
}
from
${
source_repo
}
to
${
target_repo
}
"
source_checkout
popd
>
/dev/null
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment