List of commits:
Subject Hash Author Date (UTC)
worker: be more verbose 0f0e6216ad6f5923d08c10d7461d2259e92f69cd Catalin(ux) M. BOIE 2021-10-22 17:32:01
Add /etc/ssh files to spec 91c7c4f0bd30f01abe48e5c4f4c75857982a8f21 Catalin(ux) M. BOIE 2021-10-22 06:30:23
Removed Changelog file 8e42a6cb730000a104956bc7d265321d67d49bfe Catalin(ux) M. BOIE 2021-10-22 06:22:24
Do not store dependencies in a file but in a variable 13ba1da3a4a422e798393565e0a6941df660300a Catalin(ux) M. BOIE 2021-10-22 05:49:24
Forgot to create ssh dir for spec 1fd7185cdbf427451a7f4c5ada54e43febc5184f Catalin(ux) M. BOIE 2021-10-22 05:46:41
Still need to extract rpm info when switching users c4ddd883070d8fe48c876196dd3e4e08419745eb Catalin(ux) M. BOIE 2021-10-22 05:28:24
Add build_tools to the main script b0f721d9391a9cbe443a986f7d15cd8c052abd11 Catalin(ux) M. BOIE 2021-10-22 05:18:54
Again, first install the dependencies 919e46d2a71935451f576da32b61d2b6ecab126b Catalin(ux) M. BOIE 2021-10-22 05:02:50
Cosmetic cabc1c5cec8943d614b98b7f0ca8599cf5e2682c Catalin(ux) M. BOIE 2021-10-21 17:16:33
Install dependencies before trying to build the rpm 4df3dbf7e1f79b0c616d8dbeba8b1b30c9474f17 Catalin(ux) M. BOIE 2021-10-21 16:49:37
duilder fixes 2afa9250c1da72997092847df5a2a18cddb8ccb9 Catalin(ux) M. BOIE 2021-10-21 15:59:24
worker: move dependencies path 2e8902609a2d94e2eba5fb8ccda85de90ae23fb5 Catalin(ux) M. BOIE 2021-10-21 15:22:25
Lots of changes, too hard to split them; sorry about it 77c26d9ce82d452ebdc1b609d71c5e931768805c Catalin(ux) M. BOIE 2021-10-21 06:05:51
Lots of changes to the rg daemons 8b68e3967f650953d368dfb5ca5cdd2927e9c0de Catalin(ux) M. BOIE 2021-10-21 06:05:03
Hooks: Mostly cosmetic 3633af7d937f7c9c7c0c33cdc3ad9897aab8becd Catalin(ux) M. BOIE 2021-10-21 06:04:02
Added RGFS for packages e0573aadcff81694d38ee448326964bddf0c3c13 Catalin(ux) M. BOIE 2021-10-21 06:02:37
Container changes cb3c4a84e2abc3a4b206925b60fdf4524e0379de Catalin(ux) M. BOIE 2021-10-21 06:01:25
Lots of html/css changes bde37682fac058f68806b3342ba043a2f72458ba Catalin(ux) M. BOIE 2021-10-21 06:00:29
Lots of tests updated 40e01f4db4d341d4e2dceb4407ea7d6ff523ac9e Catalin(ux) M. BOIE 2021-10-21 06:00:02
Big changes to add rpm packages repositories 5e07ff440d6ad7f0ef9900a634b2f39f0e7fa1e4 Catalin(ux) M. BOIE 2021-10-21 05:59:26
Commit 0f0e6216ad6f5923d08c10d7461d2259e92f69cd - worker: be more verbose
Author: Catalin(ux) M. BOIE
Author date (UTC): 2021-10-22 17:32
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2021-10-22 17:32
Parent(s): 91c7c4f0bd30f01abe48e5c4f4c75857982a8f21
Signer:
Signing key:
Signing status: N
Tree: b30d75efb4413fb4ed0345e7e716c599fc8a7af9
File Lines added Lines deleted
inc/user/packages_rpm.inc.php 3 3
scripts/worker.php 25 12
tests/pkg_rpm.php 2 2
File inc/user/packages_rpm.inc.php changed (mode: 100644) (index 5600724..7994b28)
... ... function rg_pkg_prepare_ev_for_dotrepo($db, &$ev)
126 126 // TODO: replace $di (used above) with below $d? // TODO: replace $di (used above) with below $d?
127 127 $di = rg_env_info($ev['env']); $di = rg_env_info($ev['env']);
128 128
129 $r = rg_packages_rpm_dotrepo_files($db, $ev['uid'],
129 $r = rg_packages_rpm_add_dotrepo_files($db, $ev['uid'],
130 130 $pkg_subrepo_id, $di['distro']); $pkg_subrepo_id, $di['distro']);
131 131 if ($r['ok'] != 1) { if ($r['ok'] != 1) {
132 132 $ret['errmsg'] = $r['errmsg']; $ret['errmsg'] = $r['errmsg'];
 
... ... function rg_packages_rpm_get_link($db, $a)
424 424 * Populates the returned array with files and content needed to build a * Populates the returned array with files and content needed to build a
425 425 * subrepo rpm (.repo & co. files). * subrepo rpm (.repo & co. files).
426 426 */ */
427 function rg_packages_rpm_dotrepo_files($db, $uid, $pkg_subrepo_id, $distro)
427 function rg_packages_rpm_add_dotrepo_files($db, $uid, $pkg_subrepo_id, $distro)
428 428 { {
429 429 global $spec_template, $make_template, $repo_template; global $spec_template, $make_template, $repo_template;
430 430
431 rg_log_enter('packages_rpm_repo_files');
431 rg_log_enter('packages_rpm_add_dotrepo_files');
432 432
433 433 $ret = array('ok' => 0); $ret = array('ok' => 0);
434 434 do { do {
File scripts/worker.php changed (mode: 100644) (index 29b7c46..b53662e)
... ... function start_worker_build_tools($job, &$reason, &$reason2)
554 554 . 'function rg_extract_rpm_info()' . "\n" . 'function rg_extract_rpm_info()' . "\n"
555 555 . '{' . "\n" . '{' . "\n"
556 556 . ' local dir=${1}; shift' . "\n" . ' local dir=${1}; shift' . "\n"
557 . "\n"
557 . "\n"
558 558 . ' xecho "rg_extract_rpm_info: dir=${dir} [`date`]"' . "\n" . ' xecho "rg_extract_rpm_info: dir=${dir} [`date`]"' . "\n"
559 559 . ' spec_file=`find "${dir}" -type f -iname \'*.spec\' | head -n1`' . "\n" . ' spec_file=`find "${dir}" -type f -iname \'*.spec\' | head -n1`' . "\n"
560 560 . ' if [ "${spec_file}" = "" ]; then' . "\n" . ' if [ "${spec_file}" = "" ]; then' . "\n"
561 561 . ' xecho " Cannot find any .spec file in ${dir}!" > ~/rg_op.err' . "\n" . ' xecho " Cannot find any .spec file in ${dir}!" > ~/rg_op.err' . "\n"
562 . ' return 1' . "\n" // we not signal this as an error
562 . ' return' . "\n"
563 563 . ' fi' . "\n" . ' fi' . "\n"
564 . "\n"
564 . "\n"
565 565 . ' spec_file_base=`basename "${spec_file}"`' . "\n" . ' spec_file_base=`basename "${spec_file}"`' . "\n"
566 566 . ' xecho " .spec file: ${spec_file} basename=[${spec_file_base}]."' . "\n" . ' xecho " .spec file: ${spec_file} basename=[${spec_file_base}]."' . "\n"
567 567 . "\n" . "\n"
 
... ... function start_worker_build_tools($job, &$reason, &$reason2)
580 580 . "\n" . "\n"
581 581 . ' rg_log_push "rg_build_dotrepo dir=${dir}"' . "\n" . ' rg_log_push "rg_build_dotrepo dir=${dir}"' . "\n"
582 582 . ' while [ 1 ]; do' . "\n" . ' while [ 1 ]; do' . "\n"
583 . ' rg_extract_rpm_info "${dir}" || break' . "\n"
583 . ' rg_extract_rpm_info "${dir}"' . "\n"
584 . ' if [ "${spec_name}" = "" ]; then' . "\n"
585 . ' xecho "Malformed .spec file?"' . "\n"
586 . ' E=1' . "\n"
587 . ' break' . "\n"
588 . ' fi' . "\n"
589 . "\n"
584 590 . ' local dst_tar_gz="/mnt/rpmbuild/SOURCES/${spec_name}-${spec_ver}.tar.gz"' . "\n" . ' local dst_tar_gz="/mnt/rpmbuild/SOURCES/${spec_name}-${spec_ver}.tar.gz"' . "\n"
585 591 . ' local dst_spec="/mnt/rpmbuild/SPECS/${spec_file_base}"' . "\n" . ' local dst_spec="/mnt/rpmbuild/SPECS/${spec_file_base}"' . "\n"
586 592 . ' local xecho "DEBUG: dst_spec=${dst_spec}."' . "\n" . ' local xecho "DEBUG: dst_spec=${dst_spec}."' . "\n"
587 . "\n"
593 . "\n"
588 594 . ' xecho "Creating tar archive [${dst_tar_gz}]"' . "\n" . ' xecho "Creating tar archive [${dst_tar_gz}]"' . "\n"
589 595 . ' rg_op_s tar czf "${dst_tar_gz}" --transform "s:^:./${spec_name}-${spec_ver}/:g" \\' . "\n" . ' rg_op_s tar czf "${dst_tar_gz}" --transform "s:^:./${spec_name}-${spec_ver}/:g" \\' . "\n"
590 596 . ' -C "${dir}" . || break' . "\n" . ' -C "${dir}" . || break' . "\n"
591 . "\n"
597 . "\n"
592 598 . ' xecho "Copying spec file [${spec_file}] -> [${dst_spec}]"' . "\n" . ' xecho "Copying spec file [${spec_file}] -> [${dst_spec}]"' . "\n"
593 599 . ' rg_cp "${spec_file}" "${dst_spec}"' . "\n" . ' rg_cp "${spec_file}" "${dst_spec}"' . "\n"
594 . "\n"
600 . "\n"
595 601 . ' xecho "Making only binary packages"' . "\n" . ' xecho "Making only binary packages"' . "\n"
596 602 . ' rg_op_s rpmbuild --define "_topdir /mnt/rpmbuild" \\' . "\n" . ' rg_op_s rpmbuild --define "_topdir /mnt/rpmbuild" \\' . "\n"
597 603 . ' -bb "${dst_spec}" || break' . "\n" . ' -bb "${dst_spec}" || break' . "\n"
 
... ... function start_worker_build_tools($job, &$reason, &$reason2)
607 613 . "\n" . "\n"
608 614 . ' rg_log_push "rg_build_rpm: dir=${dir}"' . "\n" . ' rg_log_push "rg_build_rpm: dir=${dir}"' . "\n"
609 615 . ' while [ 1 ]; do' . "\n" . ' while [ 1 ]; do' . "\n"
610 . ' rg_extract_rpm_info "${dir}" || break' . "\n"
616 . ' rg_extract_rpm_info "${dir}"' . "\n"
617 . ' if [ "${spec_name}" = "" ]; then' . "\n"
618 . ' xecho "Malformed .spec file?"' . "\n"
619 . ' E=1' . "\n"
620 . ' break' . "\n"
621 . ' fi' . "\n"
611 622 . ' local dst_tar_gz="/mnt/rpmbuild/SOURCES/${repo_username}+${spec_name}-${spec_ver}.tar.gz"' . "\n" . ' local dst_tar_gz="/mnt/rpmbuild/SOURCES/${repo_username}+${spec_name}-${spec_ver}.tar.gz"' . "\n"
612 623 . ' local dst_spec="/mnt/rpmbuild/SPECS/${repo_username}+${spec_file_base}"' . "\n" . ' local dst_spec="/mnt/rpmbuild/SPECS/${repo_username}+${spec_file_base}"' . "\n"
613 624 . "\n" . "\n"
 
... ... function start_worker_build_repo($job, $conf, &$reason, &$reason2)
954 965 . ' rgfs_mounted[${pkg_repo_id}-${pkg_subrepo_id}]=1' . "\n" . ' rgfs_mounted[${pkg_repo_id}-${pkg_subrepo_id}]=1' . "\n"
955 966 . "\n" . "\n"
956 967 . ' rgfs_subrepo_root="/mnt/build2/rgfs/${pkg_repo_id}/${pkg_subrepo_id}"' . "\n" . ' rgfs_subrepo_root="/mnt/build2/rgfs/${pkg_repo_id}/${pkg_subrepo_id}"' . "\n"
968 . ' xecho "DEBUG: env_distro=${env_distro}"' . "\n"
957 969 . ' case "${env_distro}" in' . "\n" . ' case "${env_distro}" in' . "\n"
958 970 . ' fedora|centos)' . "\n" . ' fedora|centos)' . "\n"
959 971 . ' for i in os debug src; do' . "\n" . ' for i in os debug src; do' . "\n"
 
... ... function start_worker_build_repo($job, $conf, &$reason, &$reason2)
972 984 . ' rg_cp "${pkg_list_file}" "${pkg_common_list_file}" || break' . "\n" . ' rg_cp "${pkg_list_file}" "${pkg_common_list_file}" || break' . "\n"
973 985 . ' if [ "${job_uid}" = "0" ]; then' . "\n" . ' if [ "${job_uid}" = "0" ]; then' . "\n"
974 986 . ' if [ -d "${rgfs}/+pending" ]; then' . "\n" . ' if [ -d "${rgfs}/+pending" ]; then' . "\n"
987 . ' xecho "DEBUG: dir +pending found"' . "\n"
975 988 . ' rg_create_list "${rgfs}/+pending" "${pkg_pend_list_file}" || break' . "\n" . ' rg_create_list "${rgfs}/+pending" "${pkg_pend_list_file}" || break' . "\n"
976 989 . ' rg_op cat "${pkg_pend_list_file}" >> "${pkg_common_list_file}"' . "\n" . ' rg_op cat "${pkg_pend_list_file}" >> "${pkg_common_list_file}"' . "\n"
977 990 . ' else' . "\n" . ' else' . "\n"
 
... ... function start_worker($job)
1275 1288 // Creating build.sh file // Creating build.sh file
1276 1289 // TODO: document how a user can add labels in configure or make // TODO: document how a user can add labels in configure or make
1277 1290 $s = '#!/bin/bash' . "\n"; $s = '#!/bin/bash' . "\n";
1278 $s .= 'date +%s > /mnt/status/build.sh.start' . "\n\n";
1279 1291 $s .= 'export RG_LABELS=/mnt/status/RG_LABELS' . "\n\n"; $s .= 'export RG_LABELS=/mnt/status/RG_LABELS' . "\n\n";
1280 1292 $s .= "\n"; $s .= "\n";
1281 1293
 
... ... function start_worker($job)
1447 1459 . "\n" . "\n"
1448 1460 . 'while [ "${ERR}" = "" ]; do' . "\n" . 'while [ "${ERR}" = "" ]; do' . "\n"
1449 1461 . ' echo; echo "`date`: Running build.sh script"' . "\n" . ' echo; echo "`date`: Running build.sh script"' . "\n"
1450 . ' date +%s > /mnt/T_BUILD_START' . "\n" // TODO: not read and not exposed
1462 . ' date +%s > /mnt/status/build.sh.start' . "\n\n"; // TODO: not read and not exposed?
1451 1463 . ' su - build -c "bash /mnt/build.sh" &>/mnt/status/build.log' . "\n" . ' su - build -c "bash /mnt/build.sh" &>/mnt/status/build.log' . "\n"
1452 1464 . ' E=${?}' . "\n" . ' E=${?}' . "\n"
1453 . ' date +%s > /mnt/T_BUILD_END' . "\n" // TODO: this is not read and exposed
1465 . ' date +%s > /mnt/status/build.sh.stop' . "\n\n"; // TODO: not read and not exposed?
1454 1466 . ' if [ "${E}" != "0" ]; then' . "\n" . ' if [ "${E}" != "0" ]; then' . "\n"
1467 . ' echo "`date`: DEBUG: build.sh exited with code ${E}"' . "\n"
1455 1468 . ' ERR=$(< ~/rg_op.err)' . "\n" . ' ERR=$(< ~/rg_op.err)' . "\n"
1456 1469 . ' break' . "\n" . ' break' . "\n"
1457 1470 . ' fi' . "\n" . ' fi' . "\n"
 
... ... function start_worker($job)
1490 1503 . ' echo "error building rgfs; trying to continue"' . "\n" . ' echo "error building rgfs; trying to continue"' . "\n"
1491 1504 . ' fi' . "\n" . ' fi' . "\n"
1492 1505 . "\n" . "\n"
1493 . ' if [ -r /mnt/build_repo.sh ]; then' . "\n"
1506 . ' if [ -x /mnt/build_repo.sh ]; then' . "\n"
1494 1507 . ' echo; echo "`date`: Running build_repo.sh script"' . "\n" . ' echo; echo "`date`: Running build_repo.sh script"' . "\n"
1495 1508 . ' date +%s > /mnt/T_REPO_START' . "\n" . ' date +%s > /mnt/T_REPO_START' . "\n"
1496 1509 . ' su - build2 -c "bash /mnt/build_repo.sh" &>/mnt/status/build_repo.log' . "\n" . ' su - build2 -c "bash /mnt/build_repo.sh" &>/mnt/status/build_repo.log' . "\n"
File tests/pkg_rpm.php changed (mode: 100644) (index 8bcabc7..6afe211)
... ... require_once('common.php');
21 21
22 22 $_testns = 'pkg_rpm'; $_testns = 'pkg_rpm';
23 23
24 rg_log_enter('rg_packages_rpm_dotrepo_files1');
24 rg_log_enter('rg_packages_rpm_add_dotrepo_files1');
25 25 $uid = 0; $uid = 0;
26 26 $pkg_subrepo_id = 1; $pkg_subrepo_id = 1;
27 27 $distro = 'fedora'; $distro = 'fedora';
28 $r = rg_packages_rpm_dotrepo_files($db, $uid, $pkg_subrepo_id, $distro);
28 $r = rg_packages_rpm_add_dotrepo_files($db, $uid, $pkg_subrepo_id, $distro);
29 29 if ($r['ok'] != 1) { if ($r['ok'] != 1) {
30 30 rg_log('cannot generate archive: ' . $r['errmsg']); rg_log('cannot generate archive: ' . $r['errmsg']);
31 31 exit(1); exit(1);
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main