Koozali.org: home of the SME Server

SME8 - Webshare Contrib - [Patch]

Offline BearTM

  • 5
  • +0/-0
SME8 - Webshare Contrib - [Patch]
« on: December 20, 2010, 04:57:26 AM »
I decided to take the plunge and convert my server from SME7.5.1 to SME8, and (almost) everything has gone without issue. Some minor tweaking involved, but otherwise it was a pleasant experience.

However, there was one Contrib I was using which (at present) is incompatible with SME8 - Webshare, from Darrel May.
Ref: http://wiki.contribs.org/Webshare

So, I spent a bit of time (necessity) to get it working, so I'm posting my patches here in case someone else needs to use the Webshare Contrib under SME8.

---

Install the Webshare Contrib as specified for SME7, but before step 3:

Create the following custom template fragment
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
vi 20LoadModule80AuthFile

Contents of 20LoadModule80AuthFile
Code: [Select]
{
    $OUT .= load_modules(qw(auth_basic));
    $OUT .= load_modules(qw(authn_file));
}

Optionally expand the template and restart the httpd server manually (if already installed)
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart

Continue with the Webshare configuration (Step 4)

---

Optional (but recommended) - To fix the remaining issues in the Apache error_log:
Code: [Select]
vi /etc/e-smith/web/panels/manager/cgi-bin/webshare

Change lines:
Code: [Select]
66:   tie %projects, 'esmith::config', '/home/e-smith/WebShare';
289:  my $share = $q->param ('sharename');
301:  my $indexer = $q->param ('indexer');
313:  my $description = $q->param ('description');

To:
Code: [Select]
66:   tie %projects, 'esmith::config', '/home/e-smith/db/WebShare';
289:  $share = $q->param ('sharename');
301:  $indexer = $q->param ('indexer');
313:  $description = $q->param ('description');

While the 'patch' provided above is adequate to get it all working again, it isn't the "fully correct" solution. The Contrib is effectively ancient and is using the old-style DB access method, however, I don't have the time (at the moment) to rewrite the contrib to use the new (SME7+ approved) method. Maybe sometime I might ... but for the time being, this will get it working under SME8.

Hope this helps others ...

Regards,
    Robert.

Offline mdo

  • *
  • 355
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #1 on: December 20, 2010, 05:51:42 AM »
Thanks for publishing your details. They should probably go into the Wiki.

There is a SME8 contribs QA document http://wiki.contribs.org/SME8.0_Contribs_QA which tries to collect all details for individual contribs and how suitable they are currently for a potential use in SME8.

I have linked to your details there  http://wiki.contribs.org/SME8.0_Contribs_QA#smeserver-webshare
...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: SME8 - Webshare Contrib - [Patch]
« Reply #2 on: December 20, 2010, 01:00:00 PM »
Thanks for publishing your details. They should probably go into the Wiki.
Preferably in the bugtracker against the contrib, with a link from the wiki.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline BearTM

  • 5
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #3 on: December 23, 2010, 12:25:29 AM »
Preferably in the bugtracker against the contrib, with a link from the wiki.

I've raised a bug against the contrib, and linked to the Wiki and the Forum Post with the modifications necessary to get it operational under SME8.

I see that the contrib requires a maintainer, and while I'm normally stretched to find time (isn't everyone?), I'll see about rewriting the contrib over the holidays and potentially then becoming the maintainer. It'd be good to give back to the community that has provided a reliable server for me for many years now.

Offline johnp

  • ****
  • 312
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #4 on: December 24, 2010, 08:04:15 AM »
Thanks, I think there are quite a few out there that would appreciate your efforts

Offline TTown

  • *
  • 30
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #5 on: October 11, 2011, 01:16:25 PM »
Hi,

I just did a 8.0beta6 install from scratch (actually upgrading from a fresh and squeeky clean install of 7.5.1) and failed already on the first step in http://wiki.contribs.org/Webshare
Code: [Select]
yum install --enablerepo=smecontribs smeserver-webshare

--> Error
Code: [Select]
Loaded plugins: fastestmirror, protect-packages, smeserver
Loading mirror speeds from cached hostfile
 * base: mirror.nucleus.be
 * smeaddons: aubrac-medical.fr
 * smecontribs: aubrac-medical.fr
 * smeextras: aubrac-medical.fr
 * smeos: aubrac-medical.fr
 * smeupdates: aubrac-medical.fr
 * updates: mirror.nucleus.be
smecontribs                                                                                            | 2.3 kB     00:00
smecontribs/primary_db                                                                                 | 211 kB     00:00
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Setting up Install Process
No package smeserver-webshare available.
Nothing to do

Downloading the rpm
Code: [Select]
wget http://aubrac-medical.fr/releases/7.5.1/smecontribs/i386/RPMS/smeserver-webshare-1.0.0-9.el4.sme.noarch.rpm

went ok, but the localinstall failed due to missing dependencies -->
Code: [Select]
[root@sme3 ~]# yum localinstall smeserver-webshare-1.0.0-9.el4.sme.noarch.rpm
Loaded plugins: fastestmirror, protect-packages, smeserver
Setting up Local Package Process
Examining smeserver-webshare-1.0.0-9.el4.sme.noarch.rpm: smeserver-webshare-1.0.0-9.el4.sme.noarch
Marking smeserver-webshare-1.0.0-9.el4.sme.noarch.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: mirror.netcologne.de
 * smeaddons: aubrac-medical.fr
 * smeextras: aubrac-medical.fr
 * smeos: aubrac-medical.fr
 * smeupdates: aubrac-medical.fr
 * updates: mirror.netcologne.de
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Resolving Dependencies
--> Running transaction check
---> Package smeserver-webshare.noarch 0:1.0.0-9.el4.sme set to be updated
--> Processing Dependency: perl-Apache-Htpasswd for package: smeserver-webshare
--> Finished Dependency Resolution
smeserver-webshare-1.0.0-9.el4.sme.noarch from /smeserver-webshare-1.0.0-9.el4.sme.noarch has depsolving problems
  --> Missing Dependency: perl-Apache-Htpasswd is needed by package smeserver-webshare-1.0.0-9.el4.sme.noarch (/smeserver-webshare-1.0.0-9.el4.sme.noarch)
Error: Missing Dependency: perl-Apache-Htpasswd is needed by package smeserver-webshare-1.0.0-9.el4.sme.noarch (/smeserver-webshare-1.0.0-9.el4.sme.noarch)

Fix: Look for the missing dependency here: http://rpmfind.net/linux/rpm2html/search.php?query=perl-Apache-Htpasswd and hope that this will not cause more missing dependencies. Pick an aprpriate version of the file (perl-Apache-Htpasswd-1.8-2.el5.noarch.rpm looked OK to me) and install both rpms together -->
Code: [Select]
yum localinstall *.rpm
Loaded plugins: fastestmirror, protect-packages, smeserver
Setting up Local Package Process
Examining perl-Apache-Htpasswd-1.8-2.el5.noarch.rpm: perl-Apache-Htpasswd-1.8-2.el5.noarch
Marking perl-Apache-Htpasswd-1.8-2.el5.noarch.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: mirror.netcologne.de
 * smeaddons: aubrac-medical.fr
 * smeextras: aubrac-medical.fr
 * smeos: aubrac-medical.fr
 * smeupdates: aubrac-medical.fr
 * updates: mirror.netcologne.de
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Examining smeserver-webshare-1.0.0-9.el4.sme.noarch.rpm: smeserver-webshare-1.0.0-9.el4.sme.noarch
Marking smeserver-webshare-1.0.0-9.el4.sme.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package perl-Apache-Htpasswd.noarch 0:1.8-2.el5 set to be updated
---> Package smeserver-webshare.noarch 0:1.0.0-9.el4.sme set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================
 Package                      Arch           Version                 Repository                                          Size
==============================================================================================================================
Installing:
 perl-Apache-Htpasswd         noarch         1.8-2.el5               /perl-Apache-Htpasswd-1.8-2.el5.noarch              30 k
 smeserver-webshare           noarch         1.0.0-9.el4.sme         /smeserver-webshare-1.0.0-9.el4.sme.noarch         238 k

Transaction Summary
==============================================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total size: 268 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-Apache-Htpasswd                                                                                   1/2
  Installing     : smeserver-webshare                                                                                     2/2
Migrating existing database accounts
Migrating existing database yum_available
Migrating existing database mailpatterns
Migrating existing database networks
Migrating existing database hosts
Migrating existing database yum_installed
Migrating existing database backups
Migrating existing database domains
Migrating existing database yum_updates
Migrating existing database yum_repositories
Migrating existing database configuration
Migrating existing database spamassassin

Installed:
  perl-Apache-Htpasswd.noarch 0:1.8-2.el5                     smeserver-webshare.noarch 0:1.0.0-9.el4.sme

Complete!

Hurray!

Now I could really start following BearTM's guide and it worked like a charm.

I got a webshare configured, a big file up- and downloaded and nothing seems broken.
(fnord)

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #6 on: October 11, 2011, 02:55:25 PM »
TTown
Please see
http://wiki.contribs.org/SME8.0_Contribs_QA#Setup
to configure the sme7 contribs repo correctly on sme8
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline TTown

  • *
  • 30
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #7 on: October 11, 2011, 09:19:49 PM »
Hi Mary,

you are absolutely right. I returned to a previous snapshot and did it according to this link. Worked just fine. I am sorry for having given this thread a bump (and not having read the faq first).

Greetings
Stefan
(fnord)

Offline BearTM

  • 5
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #8 on: October 12, 2011, 02:52:04 AM »
Wow ... I can't believe I've been using the "fix" I'd done for over 10 months now, and still haven't had the time to rewrite the contrib into the new database format.

I'll see what I can do about getting this one updated, since it appears that it's still in use by others (and not just by me!).

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #9 on: October 12, 2011, 07:32:25 AM »
BearTM

I also would appreciate the webshare contrib being updated as I do use it on sme7 and would like to use it on sme8.
Thanks in advance.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #10 on: May 26, 2012, 10:27:33 AM »
Hi there BearTM

Quote
I'll see what I can do about getting this one updated, since it appears that it's still in use by others (and not just by me!).

That comment was made in October 2011.
Now that sme 8.0 final has officially been released it  will be important to get webshare working correctly.
Have you had time to update this contrib ?
It would certainly be appreciated by myself and I'm sure many others if you could update it.

Thanks
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #11 on: May 28, 2012, 06:29:20 AM »
There is an updated rpm for this contrib in the 7 testing repos..HERE

Added: and it works fine on 8.0
--
qui scribit bis legit

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: SME8 - Webshare Contrib - [Patch]
« Reply #12 on: May 29, 2012, 08:11:53 AM »
Trex

Quote
There is an updated rpm for this contrib in the 7 testing repos..HERE

Thanks
Here is the bug report
http://bugs.contribs.org/show_bug.cgi?id=6454

The new rpm works OK for me too on sme8.0 (I removed the earlier mentioned patches and uninstalled the old rpm first)
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: SME8 - Webshare Contrib - [Patch]
« Reply #13 on: May 29, 2012, 09:55:34 AM »
Thanks to all who have tested this patch, bug #6454 has now been closed.
...and moving to sme contrib section of the forums, thanks Charlie.
« Last Edit: May 31, 2012, 11:37:16 PM by chris burnat »
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.