davidep
(Davide Principi)
July 8, 2016, 9:12am
1
I prepared a new version of nethserver-mock
for our @dev_team and anyone interested on building RPMs for NethServer. It is a bundle of config files for mock and shell scripts: it can be safely installed on a clean CentOS 7.
I installed it even on my Fedora 23 too
Typical invocation for ns7:
make-rpms filename.spec
This version has a new sftp-based script: upload-rpms
. It submits RPMs to packages.nethserver.org . For instance
upload-rpms packages.nethserver.org:nscom/7.2.1511/testing *.rpm
Those guys at Nethesis that have a shell function with the same name must undefine it!
Please, check it out!
http://packages.nethserver.org/nethserver/7.2.1511/testing/x86_64/Packages/nethserver-mock-1.3.0-1.2.g13c338b.ns7.noarch.rpm
Of course, it is good for building ns6 packages, too! But now you must prepend two environment variables when invoking it:
dist=ns6 mockcfg=nethserver-6-x86_64 make-rpms filename.spec
4 Likes
stephdl
(Stéphane de Labrusse)
July 8, 2016, 1:22pm
2
2 Likes
davidep
(Davide Principi)
July 8, 2016, 1:24pm
3
Right I forgot to mention the PR URL
stephdl
(Stéphane de Labrusse)
July 8, 2016, 1:26pm
4
It seems that the commit is not merged, I cannot see it in github
davidep
(Davide Principi)
July 8, 2016, 1:26pm
5
Yes it is still a pull request!
BTW you may be interested in
#!/bin/bash
#
# Copyright (C) 2016 Nethesis S.r.l.
# http://www.nethesis.it - nethserver@nethesis.it
#
# This script is part of NethServer.
#
# NethServer is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or any later version.
#
# NethServer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with NethServer. If not, see COPYING.
This file has been truncated. show original
stephdl
(Stéphane de Labrusse)
July 10, 2016, 10:12pm
6
still the same issue for me. exactly the same problem ???
[build@build7 ~]$ cd ns-repo-srpm/
[build@build7 ns-repo-srpm]$ ll
total 20
-rw-rw-r--. 1 build build 11356 11 mai 21:25 nethserver-urbackup-0.0.2-1.ns6.sdl.noarch.rpm
-rw-rw-r--. 1 build build 6855 11 mai 21:25 nethserver-urbackup-0.0.2-1.ns6.sdl.src.rpm
[build@build7 ns-repo-srpm]$ ns-upload-rpms nethserver-urbackup-0.0.2-1.ns6.sdl.noarch.rpm
Couldn't read packet: Connection reset by peer
[build@build7 ns-repo-srpm]$ ns-upload-rpms *.rpm
Couldn't read packet: Connection reset by peer
[build@build7 ns-repo-srpm]$ ll ~/bin/ns-upload-rpms
-rwxrw-r--. 1 build build 1228 8 juil. 11:29 /home/build/bin/ns-upload-rpms
[build@build7 ns-repo-srpm]$ cat ~/bin/ns-upload-rpms
#!/bin/bash
#
# Copyright (C) 2016 Nethesis S.r.l.
# http://www.nethesis.it - nethserver@nethesis.it
#
# This script is part of NethServer.
#
# NethServer is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or any later version.
#
# NethServer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with NethServer. If not, see COPYING.
#
dest=$1;
shift;
if [[ -z "${dest}" ]]; then
exec 1>&2
echo "Usage:
$0 <destination> file1.rpm [file2.rpm ...]
<destination> must be a valid sftp [user@]host[:dir[/]] format
"
exit 1
fi
(
spool=$(mktemp -u "${USER:-upload}.XXXXXX");
echo "mkdir ${spool}";
echo "cd ${spool}";
for F in $*;
do
echo "put -p $F";
done;
echo "cd ..";
echo "rename ${spool} commit-${spool}"
) | sftp -q -p -b - ${dest} | grep --color=auto '^sftp> put'
1 Like
stephdl
(Stéphane de Labrusse)
July 10, 2016, 10:13pm
7
I use a el7 to build, any clues are welcome
stephdl
(Stéphane de Labrusse)
July 12, 2016, 7:08am
8
same here when I add a path
[build@build7 ns-repo-srpm]$ upload-rpms packages.nethserver.org:nscom/6.8/testing *.rpm
Couldn't read packet: Connection reset by peer
[build@build7 ns-repo-srpm]$ upload-rpms packages.nethserver.org:nscom/6.8/testing ./*.rpm
Couldn't read packet: Connection reset by peer
BTW you should test if you don’t have at least two elements
one for the path
two for rpms
1 Like
davidep
(Davide Principi)
July 12, 2016, 7:10am
9
Thanks for the feedback steph! I’m looking at the server configuration…
stephdl
(Stéphane de Labrusse)
July 12, 2016, 7:13am
10
I have this when I launch the script alone without element.
[build@build7 ns-repo-srpm]$ upload-rpms
usage: sftp [-1246aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
[-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
[-o ssh_option] [-P port] [-R num_requests] [-S program]
[-s subsystem | sftp_server] host
sftp [user@]host[:file ...]
sftp [user@]host[:dir[/]]
sftp -b batchfile [user@]host
I should have
Usage:
$0 <destination> file1.rpm [file2.rpm ...]
<destination> must be a valid sftp [user@]host[:dir[/]] format
does it is specific to my environment ?
stephdl
(Stéphane de Labrusse)
July 12, 2016, 7:36am
11
Ok got it…I had the last function in /etc/bashrc…but it still doesn’t work.
[build@build7 ns-repo-srpm]$ ns-upload-rpms packages.nethserver.org:nscom/6.8/testing *.rpm
Couldn't read packet: Connection reset by peer
Does the issues could come that my user is not stephdl (build here in local) , like for the remote host
1 Like
davidep
(Davide Principi)
July 12, 2016, 7:55am
12
Yes you got it! I can reproduce the same error here too:
upload-rpms build@packages.nethserver.org:nscom/7.2.1511/testing nethserver-base-3.0.1*.rpm
Couldn't read packet: Connection reset by peer
Please try with
ns-upload-rpms stephdl@packages.nethserver.org:nscom/6.8/testing *.rpm
BTW, I should enable you to testing repo too… DONE
stephdl
(Stéphane de Labrusse)
July 12, 2016, 9:15am
13
[build@build7 ns-repo-srpm]$ ns-upload-rpms stephdl@packages.nethserver.org :nscom/6.8/testing *.rpm
sftp> put -p nethserver-urbackup-0.0.2-1.ns6.sdl.noarch.rpm
sftp> put -p nethserver-urbackup-0.0.2-1.ns6.sdl.src.rpm
and I got the error dependencies check email
question : do i must push the srpm also. It can be a good alternative if the developer stops to collaborate, to keep the work and fork it if needed.
davidep
(Davide Principi)
July 12, 2016, 9:19am
14
The upload must bundle all dependencies. Please set nethforge-testing for urbackup!
BTW: fixed minimum arguments count here nethserver-mock/src/bin/upload-rpms at 2ca699155025825831e6e646599578425226db4a · NethServer/nethserver-mock · GitHub
stephdl
(Stéphane de Labrusse)
July 12, 2016, 9:31am
15
[build@build7 ns-repo-srpm]$ ll
total 3984
-rw-rw-r–. 1 build build 1108728 24 mars 15:03 cryptopp-5.6.3-37.1.x86_64.rpm
-rw-rw-r–. 1 build build 11356 11 mai 21:25 nethserver-urbackup-0.0.2-1.ns6.sdl.noarch.rpm
-rw-rw-r–. 1 build build 6855 11 mai 21:25 nethserver-urbackup-0.0.2-1.ns6.sdl.src.rpm
-rw-rw-r–. 1 build build 964372 24 mars 15:58 urbackup-client-nogui-1.4.11-3.1.x86_64.rpm
-rw-rw-r–. 1 build build 1979252 24 mars 15:29 urbackup-server-1.4.14-3.1.x86_64.rpm
[build@build7 ns-repo-srpm]$ ns-upload-rpms stephdl@packages.nethserver.org :nscom/6.8/testing *.rpm
sftp> put -p cryptopp-5.6.3-37.1.x86_64.rpm
sftp> put -p nethserver-urbackup-0.0.2-1.ns6.sdl.noarch.rpm
sftp> put -p nethserver-urbackup-0.0.2-1.ns6.sdl.src.rpm
sftp> put -p urbackup-client-nogui-1.4.11-3.1.x86_64.rpm
sftp> put -p urbackup-server-1.4.14-3.1.x86_64.rpm
YUM publish success from commit-build-upload.Hio6DD to nscom/6.8/testing
nethserver-urbackup-0.0.2-1.ns6.sdl.noarch.rpm
the folder /var/lib/urbackup is created by the rpm
cryptopp-5.6.3-37.1.x86_64.rpm
urbackup-server-1.4.14-3.1.x86_64.rpm
Updated to version 1.4.14
urbackup-client-nogui-1.4.11-3.1.x86_64.rpm
Updated to version 1.4.11
Now build against cryptopp 5.6.3
nethserver-urbackup-0.0.2-1.ns6.sdl.src.rpm
the folder /var/lib/urbackup is created by the rpm
now who test it and what is the repository to call
1 Like
davidep
(Davide Principi)
July 12, 2016, 10:00am
16
Sorry steph, in this specific case (urbackup) should upload those packages to the nethforge-testing
!
upload-rpms stephdl@packages.nethserver.org:nscom/6.8/nethforge-testing *.rpm
Could you open a new development/testing thread?
Also this issue should be moved forward
opened 01:43PM - 12 May 16 UTC
closed 02:50PM - 12 Sep 17 UTC
UrBackup is an easy to setup open source client/server backup system, that throu… gh a combination of image and file backups accomplishes both data safety and a fast restoration time.
Implement nethserver-urbackup RPM package
More info here:
http://community.nethserver.org/t/nethserver-urbackup-need-testers/3272
http://community.nethserver.org/t/nethserver-as-a-backup-station/2962/11
**When it's ready and stable the package will be moved into the NethForge** @stephdl
##
davidep
(Davide Principi)
July 12, 2016, 10:09am
17
davidep
(Davide Principi)
Split this topic
July 12, 2016, 10:33am
18