services/obs-server-2.4.git
7 years agoDo not notify BUILD_BROKEN, BUILD_UNRESOLVABLE, and BUILD_EXCLUDED 87/117387/2
Junghyun Kim [Mon, 6 Mar 2017 02:34:46 +0000 (11:34 +0900)]
Do not notify BUILD_BROKEN, BUILD_UNRESOLVABLE, and BUILD_EXCLUDED

PROBLEM:
  These notifications may raise enormously if the status of
  base project goes wrong.

SOLUTION:
  Instead of direcly generate these messages, they will be checked
  when "REPO_PUBLISHED" event is processed by Jenkins.

Change-Id: I35d8cd93b92c23692539c82206789888d7fbc209
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoDo not notify BUILD_UNRESOLVABLE if the previous status was the same 03/116103/3 release-20170224
Junghyun Kim [Thu, 23 Feb 2017 02:54:17 +0000 (11:54 +0900)]
Do not notify BUILD_UNRESOLVABLE if the previous status was the same

Change-Id: I867ee4a07ac163d5ed09cd43514ff94f1a73604f
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoAdd .gbp.conf sandbox/soong9/2.4.6
SoonKyu Park [Wed, 22 Feb 2017 12:28:53 +0000 (21:28 +0900)]
Add .gbp.conf

7 years agoDowngrade version to 2.4.6
SoonKyu Park [Wed, 22 Feb 2017 08:50:38 +0000 (17:50 +0900)]
Downgrade version to 2.4.6

7 years agoModify the spec file to build successfully
Junghyun Kim [Tue, 7 Feb 2017 07:10:46 +0000 (16:10 +0900)]
Modify the spec file to build successfully

Change-Id: I441b608282e75bf9543f860e7c0ebdd289d8fc09
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agouse oldpackstatus instead of packstatus.
Junghyun Kim [Tue, 7 Feb 2017 06:09:37 +0000 (15:09 +0900)]
use oldpackstatus instead of packstatus.

Change-Id: Id6730b09218123abc7f1f5aafebe14ba00fb4f7f
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years ago'time' info is added to BUILD_START
Junghyun Kim [Fri, 3 Feb 2017 11:51:31 +0000 (20:51 +0900)]
'time' info is added to BUILD_START

Change-Id: I1212a8d715e05af12b5a8fb66a1cd866922e3ab1
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoBUGFIX: cycle packages use packstatus.
Junghyun Kim [Mon, 23 Jan 2017 05:46:28 +0000 (14:46 +0900)]
BUGFIX: cycle packages use packstatus.

PROBLEM
- Cycle packages use $packstatus before storing data

SOLUTION
- Do not restore oldpackstatus for cycle packages.

Change-Id: I410f15815fec12f1963b963edaaa2872aa437293
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoBUGFIX: do not die even if src_directory does not exist.
Junghyun Kim [Thu, 19 Jan 2017 01:44:34 +0000 (10:44 +0900)]
BUGFIX: do not die even if src_directory does not exist.

Change-Id: I22abd71bfd1a0143792676bca14d5b0d894baf36
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoMake build_log_url at the BUILD_START event
Junghyun Kim [Thu, 12 Jan 2017 06:13:55 +0000 (15:13 +0900)]
Make build_log_url at the BUILD_START event

PROBLEM:
- Two OBS services (TRBS and Prerelease) are located
  in different servers.
- TRBS events are relayed to Prerelease OBS server.
- When build_log_url is made in Prerelease OBS server,
  url would be incorrect.

SOLUTION
- Make build_log_url at the BUILD_START event in bs_sched.

Change-Id: If626ae88010d2cce761e23e09fdc10ddc6d26bf4
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoBUGFIX: hashref variable changed.
Junghyun Kim [Thu, 5 Jan 2017 10:37:08 +0000 (19:37 +0900)]
BUGFIX: hashref variable changed.

PROBLEM:
- notify("BUILD_EXCLUDED", %info) does not work

SOLUTION:
- % -> $
- notify("BUILD_EXCLUDED", $info);

Change-Id: I0f3110d27a6bed4efa4164f28fd2c14b5e6ae7f6
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoThe first stable version of buildmonitor for OBS 2.4
Junghyun Kim [Wed, 28 Dec 2016 01:56:54 +0000 (10:56 +0900)]
The first stable version of buildmonitor for OBS 2.4

Major changes
1. one_published_event is merged from OBS 2.7
2. BuildMonitorDB.pm is moved to obs-event-plugin
3. BUILD_EXCLUDED event is added
4. Notification relaying is implemented in frontend.

Squashed commit of the following:

commit ccf8b7ef8db919716d24b30a0b55fd9c0b605396
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 29 15:15:13 2016 +0900

    Implement notification relay.

    PROBLEM:
    - SPIN OBS's events could be relayed to public build.tizen.org
    - The port of the source server (5352) is not open, so we have to use
      frontend service of OBS.

    SOLUTION
    - implement REST API endpoint /source?cmd=relay_notify.

    Change-Id: Icfed50fbf1b80732138b940d61c15698b5834d5e
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit dbf69bdfd15cbfdd3ebcdaba279b3f2e399e8a08
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 29 11:26:15 2016 +0900

    Rename a file: build_monitor_db.conf

    Change-Id: I958d6ad0646fa949d6a3c814d7405deee3cdf556
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 4792880297563e8b0f188b4a3d5f032651427100
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Dec 28 10:54:10 2016 +0900

    Remove dependency of BuildMonitorDB in bs_repserver

    PROBLEM:
    bs_repserver uses a function in BuildMonitorDB.pm.
    Hence, if plugins/BuildMonitorDB.pm does not exist,
    bs_repserver will be failed to run.

    SOLUTION:
    using require, if BuildMonitorDB.pm does not exists,
    parse_statistics function will not be called.

    Change-Id: If30da8dd3597574941f9144af915f5d758850533
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 453fbb8d18bbcfa77f053acd7ece1b92c9a30a7e
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Dec 27 15:16:39 2016 +0900

    BUGFIX: if current repo is publishing do not check arch info.

    Change-Id: I063d8133cf38147c2b7e8cf3d3c91e7df7046434
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 5d507e19d3eb20965bcb182fd9410edf1fb4596d
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Dec 27 11:52:07 2016 +0900

    publish event processing is merged from 2.7.1 code.

    Change-Id: I9f0a732eaea2ddaa5e26fa49f86f9cb167a05913
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 4024bbafd5b951076c9c424bd4b4da56ec81d040
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Dec 27 11:45:41 2016 +0900

    time() info is added for aggregate packages

    Change-Id: Ic50babd2fffeafced02182c1ebef51394cc6c768
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit ee09b6d8aa1910eece88cd1841c0b8ce595d5d15
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Dec 27 07:18:33 2016 +0900

    BUILD_EXCLUDED event is added. Do not generate BUILD_START for aggregate packages

    1. BUILD_EXCLUDED event is added
    PROBLEM: if packages in the main project are broken,
    it is reflected to prerelease projects even though
    the prerelease projects does not need to build these broken packages.
    After broken packages are resolved, the status will be changed to
    be EXCLUDED in prerelase projects so that the build statuses of
    prerelease projects can be marked as succeeded.

    2. Do not generate BUILD_START for _aggregate packages
    For aggregate packages, build time is less than 1 second
    for most cases. Hence, BUILD_SUCCEEDED is generated right after
    BUILD_START is generated. For some cases, notify_buildmonitor
    receives BUILD_SUCCEEDED prior to BUILD_START. To solve this,
    I decided not to generate BUILD_START for aggregate packages.

    Change-Id: I398dfdd69a869e68b66677d9d9aa3f1c7b5489e3
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 8155102e82304782edc4e8c1f4385a2ea1d70c47
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 22 09:53:10 2016 +0900

    BuildMonitorDB.pm is moved to plugins directory.

    Change-Id: I3e98964a6964036c68a2b198ac1294cb087b2a9f
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 334535f57cbee559b8977aa6c1965f4a636b026e
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Dec 21 15:16:36 2016 +0900

    BUGFIX: use BuildMonitorDB in bs_repserver.

    Change-Id: I90e9a4ffcf689a25353d1d032241caf51d5cc608
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 1d8fb20d5556a73f85cb5549b4bcdf29bb29d63d
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Dec 13 19:19:22 2016 +0900

    BUGFIX: typo in bs_publish

    projid was not set in bs_sched (BUILD_KILL).

    Change-Id: Ie7280eb84b9f3e6c505066c3c9f1fc48c690522d
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit e68da02c3fca9ef46a13da38bf82faa441e90c7d
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 8 19:44:23 2016 +0900

    sync to BuildMonitor of OBS 2.7 version.

    Change-Id: Ife248a114e480fc415eae8e202394d1cd553e78e
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Change-Id: I1875a0f806407f298ca65e3569353633b91a846c
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoPrevent infinite looping.
Junghyun Kim [Mon, 21 Nov 2016 08:11:33 +0000 (17:11 +0900)]
Prevent infinite looping.

I do not exactly understand why 'scheduling' state in :schedulestate for more than a minute,
but it seems happened in public OBS server.
To prevent this, the while loop is exited if it takes more than a minute.

Change-Id: I7b2007e9b19c9fadec6745eba1436dfebb40c083
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoBUGFIX: publish is not generated.
Junghyun Kim [Wed, 9 Nov 2016 01:48:21 +0000 (10:48 +0900)]
BUGFIX: publish is not generated.

1. If there is an unpublished repo.
  The scheduler status is 'unpublished' if it is unpublished repo.
  In this case, this repo is ignored checking.

2. All architectures are disabled to build in a repo.
  In this case, deleterepo() function is called and just returned.
  If this repo is the last published repo in obs scheduler, it is
  possbile not to generate OBS_REPO_PUBLISHED event.

Change-Id: Ia08cece0476a5276b3a4a2527fcef8940e8d1ee5
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoBuildMonitor DB logging is now merged to devel.
Junghyun Kim [Wed, 2 Nov 2016 09:24:42 +0000 (18:24 +0900)]
BuildMonitor DB logging is now merged to devel.

(merge branch sandbox/jh0822kim/termini_logging_using_notify)

Squashed commit of the following:

commit a516fef1de5265df459272fd39113fbb69a74996
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Nov 2 18:20:13 2016 +0900

    linked packages are not inserted into info_packages.

    Change-Id: Iba571eaed2c92337a8946882b4228481dfa5c0b0
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 034bfd270bf9b874d993f5435ac106192b5cb745
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Nov 2 16:05:20 2016 +0900

    reason field is removed from BUILD_START in rebuildaggregate().

    Change-Id: I4e334423409b6f4314279b756e1ec81e3160d6dd
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 696018ebf5bda2e96c410828ae65ab937d6f02e2
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Nov 2 15:56:47 2016 +0900

    aggregate packages are recorded from now on.

    Change-Id: I72fc832de352df0910da956ca2342da0fc584d9a
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit ef4b8614298b7c9e3033ef3113d8f42cfd36e9e8
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Nov 2 15:30:12 2016 +0900

    "use URI::Escape" inserted.

    Change-Id: I319d15764896b04cec8e10d3fc5c1e2989dc8ada
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit a8830f0964c9fc632e9aedc4ea74e9b729251e61
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Nov 2 13:28:21 2016 +0900

    typo is fixed and db configration info is removed.

    Change-Id: I5f4fb7adc9a63d43e633e7e344925bdf3eef2844
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit e5709e48782c45e7ccc202d8680a6874f9012cb3
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Nov 2 13:21:37 2016 +0900

    BUGFIXED: typo.

    Change-Id: I00a34154c3156840f5c226ca4151334b759ece7f
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 873358e041477052f028c6e662b5cf8de56b1ff1
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Nov 2 11:12:42 2016 +0900

    Build finish information about aggregate packages is shown from now on.

    Change-Id: I477fc76073c3321b41ab42ac98ed18b49417d1e5
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit fbaf05b059ae51174efd728aee4077e69127ed83
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Oct 25 20:19:36 2016 +0900

    bug fixed on bs_srcserver

    Change-Id: Ibe7a9afd672396ab340ca72343ea7b9772cf4368
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 15b198d46c78d714796d1235eb2d57deac0d44e3
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Oct 25 08:23:34 2016 +0900

    build_project table is owned by OBS from now on.

    Change-Id: I2e53e7b08350320c8c25ff605f371e079947594a
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit e443fdbc82a2faa27335ecc276ffe8906a757842
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Fri Oct 21 17:32:39 2016 +0900

    new build monitor logging implemented using BSNotify::notify plugin.

    Change-Id: Ie3a56b49983551d5cf3df0c405fe4dc8b24cbde7
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Change-Id: Ic750640fa5936a94842e36160fa1f16ff4cdb874
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years ago Update sync bs_publish for the public obs backend
Yonghee Han [Thu, 27 Oct 2016 23:13:18 +0000 (08:13 +0900)]
 Update sync bs_publish for the public obs backend

Change-Id: I538f121fb312819da3dfbe54f09985d02daad7d7

7 years agoBUGFIX: multiple OBS_REPO_PUBLISHED event.
Junghyun Kim [Thu, 27 Oct 2016 04:46:50 +0000 (13:46 +0900)]
BUGFIX: multiple OBS_REPO_PUBLISHED event.

BUG SCENARIO:
  1. arm-wayland/armv7l is building
  2. arm-wayland/i586 is building
  3. arm-wayland/i586 finished building, hence it sends the publish event.
  4. current status => (arm-wayland/armv7l, building), (arm-wayland/i586, publishing).
  5. bs_publish checks publish status: except arm-wayland, other repos are published.
  6. In this case, OBS_REPO_PUBLISHED event is generated even though arm-wayland/armv7l is building.

REASON:
  bs_sched sends an event to bs_publish with {project,repo}.
  bs_sched does not send architecture info currently.
  In this case, bs_publish does not know which architecture of bs_sched has sent this publish event.
  Hence, the previous implementation does not consider each architectures' status.

SOLUTION:
  1. bs_publish
    If any architecture is not 'publishing' in the same repo, do not generate OBS_REPO_PUBLISHED.

Change-Id: I19166d2d81a721f7d5dcc0074b20361b962cfb23
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoMerge branch 'sandbox/jh0822kim/one_publish_per_project' into devel
Junghyun Kim [Thu, 22 Sep 2016 22:22:06 +0000 (07:22 +0900)]
Merge branch 'sandbox/jh0822kim/one_publish_per_project' into devel

OBS_PUBLISHED event is generated only when all repo/archs are published.

This is not suitable for the original OBS policy, but Tizen requires this.
(I don't like it, but I have to do it!)

Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Conflicts:
src/backend/bs_sched

- notify_jenkins.pm file is removed.

Change-Id: Ia4be1ed0066ecebaa7d177ad9190b21e2003e1ad
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoFeature : create new 'rpmbuildstage:' option on OBS.
Yonghee Han [Fri, 12 Aug 2016 05:32:25 +0000 (14:32 +0900)]
Feature : create new 'rpmbuildstage:' option on OBS.
Use : add 'rpmbuildstage: bb' option at the OBS Project config.
Modify : build -> send BUILD_RPM_BUILD_STAGE option to VM build.data
         build.pm -> precheck the rpmbuildstage: option.
Related package: bs_worker of the obs-server package.

Change-Id: I22d76cbe2eae6aaffa67891a5b7bc3c04572535d

7 years agopackaging: add packaging spec files
Yonghee Han [Thu, 11 Aug 2016 09:20:49 +0000 (18:20 +0900)]
packaging: add packaging spec files

Change-Id: If6545b0ad53bbdb26e282e92925edbe501c213da

7 years agoDo not copy *.src.rpm if Rpmbuildstage:bb is in project config.
Junghyun Kim [Fri, 12 Aug 2016 02:11:15 +0000 (11:11 +0900)]
Do not copy *.src.rpm if Rpmbuildstage:bb is in project config.

There are two things changed.
1. Do not copy *.src.rpm
If "Rpmbuildstage: bb" is declared in project config,
obs scheduler does not copy *.src.rpm.
"Rpmbuildstage: bb" means that do not generate *.src.rpm.
In general, this is applied only to prerelease project.
In this case, the number of RPMs in Tizen:Mobile and
the number of RPMs in home:prerelease:Tizen:Mobile:* can be different.
Then, build-compare reports that the results of the two projects are different
even though the only difference is *.src.rpm.
This commit prohibits this case by not making a symlink for *.src.rpm.

2. My private functions are moved to BSPrereleaseOpt.pm
As a result, we changed only one line from the original bs_sched file.

Change-Id: Ie91247bdedd975dd508de786b61e030bd8043cef
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoPreventing unnecessary package builds for prerelease projects.
Junghyun Kim [Mon, 8 Aug 2016 23:31:57 +0000 (08:31 +0900)]
Preventing unnecessary package builds for prerelease projects.

For normal OBS projects, if the result binary for package PKG_A is not changed,
packages depending on PKG_A are not build due to build-compare package.

However, for prerelease projects, if a build is triggers for package PKG_A,
all packages depends on PKG_A are built in prerelease projects.

REASON
To perform build-compare, we need two rpms: oldrpm and newrpm.
However, for prerelease projects, there is no oldrpm since there is no rpms built for the prerelease project.

SOLUTION
Sym-link rpm files from the linked projects.
For example,
ln -s /srv/obs/build/Tizen:Mobile/arm-wayland/armv7l/libnl2/*.rpm /srv/obs/build/home:prerelease:Tizen:Mobile:submit:tizen:20160729.002907/arm-wayland/armv7l/libnl2

To do this, we have to change two things.
1. jenkins-script
To perform this functionality as an option, this functionality is performed only if "CopyLinkedPackages: yes" is in project config.
To do this, we have to change "job_submit.py" in jenkins-script.
"job_submit.py" adds "CopyLinkedPackages: yes" at the end of project config for prerelease projects.

2. bs_sched (OBS)
If "CopyLinkedPackages: yes" is found in project config, make a symbolic link for the package before this package is built.

Change-Id: Ie484432d735f00b889cdb9379f4a3aa41f7b8ef3
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoImported Upstream version 2.4.6 upstream upstream/2.4.6
SoonKyu Park [Wed, 22 Feb 2017 08:49:06 +0000 (17:49 +0900)]
Imported Upstream version 2.4.6

8 years agoImported Upstream version 2.4.8 upstream/2.4.8
Yonghee Han [Tue, 9 Aug 2016 11:12:32 +0000 (20:12 +0900)]
Imported Upstream version 2.4.8

8 years agoInitial empty repository
seonil kim [Fri, 3 Jun 2016 04:37:18 +0000 (21:37 -0700)]
Initial empty repository