Changes of Revision 16
kolab-freebusy.spec
Changed
x
1
2
%endif
3
4
%global _ap_sysconfdir %{_sysconfdir}/%{httpd_name}
5
+%global upstream_version 1.1.2
6
7
Name: kolab-freebusy
8
-Version: 1.1.2
9
+Version: 1.1.2.6
10
Release: 1%{?dist}
11
Summary: Kolab Free/Busy Web Presentation Layer
12
13
Group: Applications/Internet
14
License: AGPLv3+
15
URL: http://kolab.org/about/kolab-freebusy
16
-Source0: %{name}-%{version}.tar.gz
17
+Source0: %{name}-%{upstream_version}.tar.gz
18
Source1: kolab-freebusy.logrotate
19
20
BuildArch: noarch
21
22
for its users.
23
24
%prep
25
-%setup -q
26
+%setup -q -n %{name}-%{upstream_version}
27
28
%install
29
mkdir -p \
30
31
popd
32
33
cp -a public_html %{buildroot}/%{_datadir}/%{name}/public_html
34
-ln -s ../roundcubemail/vendor vendor
35
-
36
cp -a config/config.ini.sample %{buildroot}/%{_sysconfdir}/%{name}/config.ini
37
38
pushd %{buildroot}/%{_datadir}/%{name}/config
39
40
popd
41
42
pushd %{buildroot}/%{_datadir}/%{name}/
43
+ln -s ../roundcubemail/vendor vendor
44
ln -s ../../..%{_localstatedir}/log/%{name} logs
45
popd
46
47
debian.changelog
Changed
27
1
2
+kolab-freebusy (1.1.0.0-0~kolab4) unstable; urgency=low
3
+
4
+ * New release
5
+
6
+ -- Christian Mollekopf <mollekopf@apheleia-it.ch> Wed, 09 Aug 2023 11:17:36 +0100
7
+
8
kolab-freebusy (1.1.0-0~kolab4) unstable; urgency=low
9
10
* Remove superfluous `conffiles`
11
12
13
-- Christoph Erhardt <kolab@sicherha.de> Thu, 06 Jan 2022 11:17:36 +0100
14
15
-kolab-freebusy (1.1.2-0~kolab3) unstable; urgency=low
16
+kolab-freebusy (1.1.2.6~kolab3) unstable; urgency=low
17
18
* bring postinst script in line with other web packages
19
20
-- Daniel Hoffend <dh@dotlan.net> Tue, 12 Nov 2019 21:45:23 +0100
21
22
-kolab-freebusy (1.1.2-0~kolab2) unstable; urgency=low
23
+kolab-freebusy (1.1.2.6~kolab2) unstable; urgency=low
24
25
* Release of version 1.1.2
26
27
debian.rules
Changed
21
1
2
fi
3
4
override_dh_install:
5
- if -f composer.json-dist ; then \
6
- rm -rf composer.json ; \
7
- mv composer.json-dist composer.json ; \
8
- fi
9
- mkdir -p $(CURDIR)/debian/home/.composer/
10
- echo '{}' > $(CURDIR)/debian/home/.composer/composer.json
11
- patch -p1 < debian/patches/add-composer-autoloader.diff || :
12
- HOME=$(CURDIR)/debian/home/ composer -vvv dumpautoload --optimize
13
- sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_psr4.php
14
- sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_namespaces.php
15
- sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_classmap.php
16
- sed -i -e "s|__DIR__ . '/../..' . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_static.php || true
17
-
18
dh_install --list-missing -XLICENSE
19
20
# install sample config
21
debian.tar.gz/install
Changed
5
1
2
lib usr/share/kolab-freebusy/
3
-vendor usr/share/kolab-freebusy/
4
public_html usr/share/kolab-freebusy/
5
debian.tar.gz/links
Changed
7
1
2
etc/roundcubemail/defaults.inc.php /usr/share/kolab-freebusy/config/defaults.inc.php
3
usr/share/roundcubemail/plugins /usr/share/kolab-freebusy/lib/plugins
4
usr/share/roundcubemail/program/lib/Roundcube /usr/share/kolab-freebusy/lib/Roundcube
5
+usr/share/roundcubemail/vendor /usr/share/kolab-freebusy/vendor
6
var/log/kolab-freebusy /usr/share/kolab-freebusy/logs
7
kolab-freebusy-1.1.2.tar.gz/lib/Kolab/Config.php
Changed
10
1
2
}
3
else if (is_array($config)) {
4
$pkey = rtrim($prefix, '.');
5
- $this->data$pkey = is_array($this->data$pkey) ? array_replace_recursive((array)$this->data$pkey, $config) : $config;
6
+ $this->data$pkey = is_array($this->data$pkey ?? null) ? array_replace_recursive((array)$this->data$pkey, $config) : $config;
7
}
8
9
foreach ((array)$config as $key => $val) {
10
kolab-freebusy-1.1.2.tar.gz/lib/Kolab/FreeBusy/Directory.php
Changed
22
1
2
// forward request to Source instance
3
if ($data = $source->getFreeBusyData($this->postprocessAttrib($user), $extended)) {
4
// send data through the according format converter
5
- $converter = Format::factory($this->config'format');
6
+ $converter = Format::factory($this->config'format' ?? null);
7
$data = $converter->toVCalendar($data);
8
9
// cache the generated data
10
- if ($data && $this->config'cacheto' && !$source->isCached()) {
11
+ if ($data && !empty($this->config'cacheto') && !$source->isCached()) {
12
$path = preg_replace_callback(
13
'/%\{?(a-z0-9+)\}?/',
14
function($m) use ($user) { return $user$m1; },
15
16
return $attrib;
17
}
18
19
-}
20
\ No newline at end of file
21
+}
22
kolab-freebusy-1.1.2.tar.gz/lib/Kolab/FreeBusy/DirectoryLDAP.php
Changed
25
1
2
'hosts' => array($config'host'),
3
'port' => $host'port' ?: 389,
4
'use_tls' => $host'scheme' == 'tls',
5
- 'root_dn' => $config'root_dn' ?: $config'base_dn',
6
+ 'root_dn' => ($config'root_dn' ?? null) ?: ($config'base_dn' ?? null),
7
'log_hook' => array($this, 'log'),
8
) + $config;
9
10
11
12
// result attributes
13
$attribs = array_unique(array_merge(
14
- Config::convert($this->config'mail_attributes', Config::ARR),
15
- Config::convert($this->config'attributes', Config::ARR), // deprecated
16
- Config::convert($this->config'resolve_dn', Config::ARR),
17
- Config::convert($this->config'resolve_attribute', Config::ARR)
18
+ Config::convert($this->config'mail_attributes' ?? null, Config::ARR),
19
+ Config::convert($this->config'attributes' ?? null, Config::ARR), // deprecated
20
+ Config::convert($this->config'resolve_dn' ?? null, Config::ARR),
21
+ Config::convert($this->config'resolve_attribute' ?? null, Config::ARR)
22
));
23
24
// search with configured base_dn and filter
25
kolab-freebusy-1.1.2.tar.gz/lib/Kolab/FreeBusy/SourceIMAP.php
Changed
72
1
2
}
3
4
// set ACL (temporarily)
5
- if ($config'acl') {
6
+ if ($config'acl' ?? null) {
7
$folder->_old_acl = $folder->get_myrights();
8
$imap->set_acl($folder->name, $config'user', $config'acl');
9
}
10
11
foreach ($folder->select($query) as $event) {
12
//$log->debug('Processing event', $event);
13
14
- if ($event'cancelled') {
15
+ if ($event'cancelled' ?? null) {
16
continue;
17
}
18
19
20
21
// avoid duplicate entries
22
$key = $event'start'->format('c') . '/' . $event'end'->format('c');
23
- if ($seen$key++) {
24
+ if (!empty($seen$key)) {
25
$log->debug('Skipping duplicate event at ' . $key, array($event'uid', $event'title'));
26
continue;
27
}
28
+ $seen$key = true;
29
30
// copied from libvcalendar::_to_ical()
31
$ve = $this->to_vevent($event, $calendar, $user_email);
32
33
- if ($event'recurrence') {
34
+ if ($event'recurrence' ?? null) {
35
if ($exdates = $event'recurrence''EXDATE')
36
unset($event'recurrence''EXDATE');
37
if ($rdates = $event'recurrence''RDATE')
38
39
private function imap_disconnect($imap, $config, $folders)
40
{
41
// reset ACL
42
- if ($config'acl' && !empty($folders)) {
43
+ if (($config'acl' ?? null) && !empty($folders)) {
44
foreach ($folders as $folder) {
45
$imap->set_acl($folder->name, $config'user', $folder->_old_acl);
46
}
47
48
*/
49
private function check_participation($event, $user_email, &$status = null)
50
{
51
+ $is_organizer = false;
52
if (is_array($event'organizer') && !empty($event'organizer''email')) {
53
if (in_array($event'organizer''email', $user_email)) {
54
$is_organizer = true;
55
}
56
}
57
58
- if (!$is_organizer && is_array($event'attendees')) {
59
+ if (!$is_organizer && is_array($event'attendees' ?? null)) {
60
foreach ($event'attendees' as $attendee) {
61
if (in_array($attendee'email', $user_email)) {
62
$status = $attendee'status';
63
64
}
65
}
66
67
- if ($is_organizer || $event'namespace' == 'personal') {
68
+ if ($is_organizer || ($event'namespace' ?? null) == 'personal') {
69
$status = 'ACCEPTED';
70
if ($event'free_busy' == 'tentative') {
71
$status = 'TENTATIVE';
72
kolab-freebusy-1.1.2.tar.gz/lib/Kolab/FreeBusy/Utils.php
Changed
19
1
2
}
3
4
// range from-to specified (IPv4 only)
5
- list($lower, $upper) = explode('-', $range);
6
+ list($lower, $upper) = array_pad(explode('-', $range), 2, null);
7
if (strlen($upper) && !$ipv6) {
8
if ($ipbin >= ip2long(trim($lower)) && $ipbin <= ip2long(trim($upper))) {
9
return true;
10
11
}
12
13
// subnet/length is given
14
- list($subnet, $bits) = explode('/', $range);
15
+ list($subnet, $bits) = array_pad(explode('/', $range), 2, null);
16
17
// IPv6 subnet
18
if (strlen($bits) && $ipv6) {
19
kolab-freebusy-1.1.2.tar.gz/public_html/index.php
Changed
28
1
2
3
$log = Logger::get('web');
4
5
- $uri = $_SERVER'REDIRECT_URL';
6
+ $uri = $_SERVER'REDIRECT_URL' ?? null;
7
8
// we're not always redirected here
9
if (empty($uri)) {
10
11
$log->addDebug('Request (redirect): ' . $uri, array('ip' => $remote_ip, 'trusted' => $trusted_ip));
12
}
13
14
- list($uri, $args) = explode('?', $uri);
15
+ list($uri, $args) = array_pad(explode('?', $uri), 2, null);
16
17
// check HTTP authentication
18
if (!$trusted_ip && $config->httpauth) {
19
20
header('Content-type: text/plain; charset=utf-8', true);
21
22
// analyse request
23
- $user = $_SERVER'FREEBUSY_USER';
24
+ $user = $_SERVER'FREEBUSY_USER' ?? null;
25
$extended = !empty($_SERVER'FREEBUSY_EXTENDED');
26
27
if (!$user) {
28
kolab-freebusy.dsc
Changed
10
1
2
Source: kolab-freebusy
3
Binary: kolab-freebusy
4
Architecture: all
5
-Version: 1.1.2-0~kolab4
6
+Version: 1.1.2.6-1~kolab1
7
Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
8
Homepage: http://www.kolab.org
9
Standards-Version: 3.9.3
10
release.sh
Added
17
1
2
+#!/bin/bash
3
+
4
+./buildtarball.sh
5
+
6
+# Autobump the version
7
+CURRENT_VERSION=$(grep '^Version: ' ./*.spec | sed 's/Version: //')
8
+NEW_VERSION=$(echo "$CURRENT_VERSION" | awk -F. '/0-9+\./{$NF++;print}' OFS=.)
9
+echo "Bumping from $CURRENT_VERSION to $NEW_VERSION"
10
+
11
+sed -i "s/$CURRENT_VERSION/$NEW_VERSION/" debian.changelog
12
+sed -i "s/^Version:.*/Version: $NEW_VERSION-1~kolab1/" ./*.dsc
13
+sed -i "s/^Version:.*/Version: $NEW_VERSION/" ./*.spec
14
+
15
+osc ci -m "New release $NEW_VERSION"
16
+osc sr Kolab:16 --yes -m "New release $NEW_VERSION"
17