[closed] Beta 2: Bubba web admin - build on Gentoo

Discuss development on Bubba
Post Reply
Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

[closed] Beta 2: Bubba web admin - build on Gentoo

Post by Gordon » 07 Jul 2015, 11:12

Fri 8 Jan 2016: I'm closing this thread as I'm entering the stage of Release Candidate

This is the second beta of the Bubba web admin running on Sakaki's Gentoo-on-B3. If you are running Gentoo based on the latest live USB release (1.8.0) you can install this by running the following command:

Code: Select all

emerge -av bubba
prerequisites
  • Your ebuild environment must have either USE flag 'apache2' or USE flag 'nginx' set
    (i.e. one of them, not both)
  • With nginx you will need to manually edit your web-server config file to include ./vhosts.d/*
    this is where I put the site definition file
Please make sure to bring your repositories up to date, so you get the most recent version. If you do not have the bubba repo in your current Gentoo install you can load it from layman.

Known issues
  • if your wifi network adapter does not identify as wlan0, changing wifi settings will be disabled.
    • Solution: add a udev rule to rename the wifi network adapter from wlp?s? to wlan0
      • This is now handled in the 1.7.0 release of Sakaki's Live USB
  • If you change the network profile your whole network config will be overwritten. This is by design and will (re)set your lan interface to address 192.168.10.1
  • The default network configuration on Sakaki's live USB editions have bridge interface br0 configured to be the lan interface, with only the wired adapter eth1 assigned to it. This may confuse the web admin if you own a B3 wifi, showing wifi as enabled but not working. If that is the case simply disable and the re-enable wifi through the web admin. The issue should correct itself this way.
Screenshots

Image


Image


Image
Last edited by Gordon on 30 May 2016, 06:06, edited 19 times in total.

sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Re: Beta: Bubba web interface - build on Gentoo

Post by sakaki » 09 Jul 2015, 06:59

Hi Gordon

Looks great! I'll include this emerged with the next live-USB release.
Any plans for an Arch variant? (I think it'd be quite popular!)

Best, sakaki

Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

Re: Beta: Bubba web interface - build on Gentoo

Post by Gordon » 09 Jul 2015, 09:03

No Arch. I'm sticking with Gentoo as I'm familiar with that and it keeps me off the troublesome path of needing to figure out yet another organization structure. I guess though that the patches provided within the ebuilds could hint others to identify where changes should be applied.

Do note that this is still a (very early) beta. Some functions such as adding and deleting users work, others don't or allow you to do stuff that could be harmful to the installation. For instance, in the disk information view shown above, the USB disk is my /boot partition and I really need to add some logic to protect it. At present I can also not test the firewall settings, because this requires the network editor to function first (settings are blocked).

I also fixed the sysvinit ebuild. As part of one of my tests I had disabled the write-magic patch and forgot to turn it back on when pushing it to github.

Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

Re: Beta 2: Bubba web interface - build on Gentoo

Post by Gordon » 08 Sep 2015, 10:35

Changes 2015-09-12

Fix trailing newline addition to net conf file with every change to the network configuration

Sanitized handling of "null" configured NICs (i.e. NICs that do need to be initialized because they are part of a bridge or a PPPoE connection but should not receive address for themselves). The web UI will now display these as having address 0.0.0.0 rather than "automatic" and you can also set a NIC to "null" configuration by setting this address in the web UI

====================

Changes 2015-09-08

Fixed incorrect speed setting in inittab due to double editing of ttyS0 definition

Masked sys-apps/sysvinit with "**" keyword
  • Apparently replacing the original package caused frowning with some people. Don't know the who, the what or the why, but I have no issues with it because it's just as simple to unmask as it would have been for them to mask it or unsubscribe the overlay.

    In any case, if you ever typed 'halt' from console and found your B3 to stay in a freezed state, you'll want this package. You'll need to edit two portage files though to unmask it with the upcoming version of Sakaki's Live USB, since it is included in package.mask as well. A bit inconvenient, but it can't be helped at this point.
====================

Changes 2015-09-07

Fixed creation of incorrect network conf entries when adapter is set to use dhcp or "null"
Fixed race condition during changing of network parameters

Fixed incorrect display of firewall settings due to missing paths

====================

Changes 2015-09-02

Fixed a rights issue with bubba manual on apache systems (Thx Sakaki)

New update for bubba-networkmanager: now supports listing ppp as wan device and includes the proper conf file to manage dnsmasq settings through the web frontend.

Added debug USE flag to bubba-frontend to control whether php errors should be shown to the user - as of now the default without this USE flag is "not"

Fixed Tor service page

====================

Changes 2015-08-31

Fixed some issues with conf files: bubbacfg and apache vhost

Fixed a dependency issue when building the B3 frontend using binary packages. (Thx for the feedback, Sakaki)

Added HDD temperature to the stat page, which I only discovered to be missing today because it was originally added as an optional element and thus did not throw any error or display invalid data.

====================

Changes 2015-08-25

Fixed issue with latest release of timezone-data (2015e) dropping the part of the database that was referenced by bubba-backend.

New ebuild for Domoticz, which changed its source repository from subversion to git

Added keyword "~ppc" to allow installing the web frontend on a B2 as well

====================

Changes 2015-08-23

Fixed last references towards mybubba.org domain

Corrected license name for CodeIgniter form propriatary to 'MIT'

====================

Changes 2015-08-11

Fixed dnsmasq service tracker. Now properly showing service running status and display of DHCP leases if applicable.

====================

Changes 2015-08-07

Added Bubba manual

Also started to add ~ppc keyword to packages, figuring there should be no reason for these packages not to be able to run on a B2 as well.

====================

Changes 2015-07-31

Fixed the wireless settings being blocked by interfaces not hardcoded in bubba-networkmanager. Wireless interface still must be named according to the old standards (i.e. wlan0)

Fixed another issue with the transfer to netlink 3, causing the channel listing to be empty. Do note that if you select 5Ghz band the channel listing is probably still empty. This is because these channels are blocked by a regulatory domain setting in the onboard eeprom ("passive_scanning" set to "true").

====================

Changes 2015-07-24

Log file listing is now dynamically determined. Added some color scheming to the list as well, so it gets easier to identify what service a log file belongs to.

Fixed an issue with PHP 5.6 and HTTP_RAW_POST_DATA

====================

Changes 2015-07-23

Fixed an issue with the delete user routine - you can't delete a samba user if you already deleted the unix user.

Fixed the problem with the obsolete bubba-igd service

Printer service can now also be controlled - it was renamed from 'cups' to 'cupsd'

====================

Changes 2015-07-22

Changed the CGI method to FPM. Bubba web interface now also works with Apache >= 2.4.9 (original release was only tested on Nginx)

====================

Changes 2015-07-21

Added a gpio aware version of the identify_box script (callable through http://b3/admin/ajax_settings/identify) that will make your B3 beep and rotate the front led color in a red-green-blue sequence for 20 seconds. A bit of a gimmick, but handy if you have a couple of B3's lined up and don't really know which one is which. Like the original script it is python based and it takes a while before the sequence actually starts: ~15 seconds the last time I counted.

====================

Changes 2015-07-12

Firewall settings are now working as well.
Do note a small change from the original scripts though. The web interface no longer manipulates the INPUT, FORWARD and *ROUTING chains directly, but user defined chains Bubba_IN, Bubba_FWD, Bubba_DNAT and Bubba_SNAT that need to be defined and linked.

Fixed the Disk Information view. See updated image in first post.
Now correctly identifying system partitions rather than rely on an assumed disk layout.

WAN and LAN network pages are now also functional, including a fix not to show DHCP leases if the DHCP server is not enabled. I should probably hide that whole section of the page in this case, but that's something I'll worry about later.

kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Beta 2: Bubba web interface - build on Gentoo

Post by kurt2000 » 21 Oct 2015, 15:16

Hi Gordon & Co.

Thank you so much.

I'm currently building af new kernel because i need to enable dvb-t.

When i first started out, i didn't knew that you made buildkernel-b3, oh my - things seem much easier now :-)

I've installed on a internal disk, but the web interface is not working, /opt/bubba is missing, could it be that it was only working on the usb ? Never mind ill try emerge -av bubba

Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

Re: Beta 2: Bubba web interface - build on Gentoo

Post by Gordon » 21 Oct 2015, 16:55

The install method is merely a simple copy of folders that are on the live USB. I do suspect though that Sakaki did not include /opt in the howto install description. If you do have the Gentoo Live SE USB it should be sufficient to copy the /opt content to the internal disk. Installing the bubba package won't work as the install database will tell it is a reinstall and "think" that all the dependencies are there already as well.

kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Beta 2: Bubba web interface - build on Gentoo

Post by kurt2000 » 27 Oct 2015, 02:00

Ok, thanks, I've reinstalled the disk.

I've scanned the threads about easyfind.pl

Is it still only possible to use easyfind service if you install the web interface, or can it be done by commandline ?

With kind regards.

/kurt

Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

Re: Beta 2: Bubba web interface - build on Gentoo

Post by Gordon » 27 Oct 2015, 05:40

You can use it from commandline and it can use your original easyfind config. Do note that the paths differ from the original Squeeze based operating system though.

/etc/network/easyfind.conf ==> /etc/bubba/easyfind.conf

Code: Select all

# Update your IP:
/opt/bubba/bin/easyfind.pl

# Retrieve your currently registered name:
/opt/bubba/bin/easyfind.pl getname

# Set or change your currently registered name:
/opt/bubba/bin/easyfind.pl setname <newname>

# Disable easyfind
/opt/bubba/bin/easyfind.pl disable

PS: found a little bug just now in the web interface, so this is at present the only way to control easyfind.

kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Beta 2: Bubba web interface - build on Gentoo

Post by kurt2000 » 31 Oct 2015, 20:12

Hi

can you help me out with this conflict ?

Ive tried updating and removing, nothing helps me. Catch 22

Code: Select all

Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (dev-perl/JSON-2.590.0-r1:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-perl/JSON required by (app-admin/bubba-backend-2.6_pre150907:0/0::bubba, ebuild scheduled for merge)

  (dev-perl/JSON-XS-3.10.0:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-perl/JSON-XS required by (app-admin/bubba-backend-2.6_pre150907:0/0::bubba, ebuild scheduled for merge)


For more information about Blocked Packages, please refer to the following
section of the Gentoo Linux x86 Handbook (architecture is irrelevant):

https://wiki.gentoo.org/wiki/Handbook:X86/Working/Portage#Blocked_packages

Never mind, i reinstalled sadakis special edition and adder /opt to the install script.

The easyfind service is a bit strange. I Will try to update the client scripts.


With kind regards

Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

Re: Beta 2: Bubba web interface - build on Gentoo

Post by Gordon » 05 Nov 2015, 11:50

Hi,

I verified those issues and can't replicate the JSON / JSON-XS conflict. The version of JSON should however be 2.900.0 to match the selected version of JSON-XS and the cause may be a missing keyword in your portage files. I'll correct this in the next version by enforcing a minimal version, which should prompt you with a request to automatically add the missing keyword.

Did find an issue with easyfind. Turns out this is caused by the newer JSON::XS that no longer translates boolean values into literal "false" or "true" strings. As a result the easyfind script interprets a correct response from the easyfind server as an error state. While annoying, the problem is restricted to updating the easyfind config file. The service itself does function correctly.

Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

Re: Beta 2: Bubba web interface - build on Gentoo

Post by Gordon » 06 Nov 2015, 04:59

Changes 2015-11-06

Corrected faulty error trapping in easyfind due to upgraded json libraries (false ≠ "false")
Fixed path issues and changed domain names (still had a reference towards mybubba.org) causing easyfind not to function from the web administrator
Fixed compile error due to incorrect concatenating of flags in libbubba-info (no version bump, therefore new installs only)
Dependency issue with Perl JSON libraries should now be solved as well

  • Note: if you're running Sakaki's 1.7.0 SE edition you can install the latest update like this:

    Code: Select all

    cd /usr/local/portage/bubba/
    git pull
    emerge -avuD @world 

kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Beta 2: Bubba web interface - build on Gentoo

Post by kurt2000 » 06 Nov 2015, 09:19

You're a sweetheart.

I'll try it when i get home.

Thanks!

kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Beta 2: Bubba web interface - build on Gentoo

Post by kurt2000 » 06 Nov 2015, 13:41

Hi

I'm now able to use the setname command. It works.

Thank you

Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

Re: Beta 2: Bubba web admin - build on Gentoo

Post by Gordon » 22 Dec 2015, 14:35

Changes 2015-12-18

Changing hostname did not persist in between reboots. Fixed code to alter existing hosts file rather than overwrite with default entries and added ServerName directive to apache vhost definition.

Fixed problem with missing Listen directive when DEFAULT_VHOST is not defined.

====================
Changes 2015-12-20

Sanitized patch files with an added comment section on top

Edited the "software update" page to become a "version info" page. This release will not have support for updating or installing software through the web UI. The detailed information on the version info page is now expanded by default and displays the current running kernel version for "bubba3-kernel". Bubba-album is replaced by singapore.

Added "bubba" portage set. To install a full bubba system all you need to do now is run

Code: Select all

emerge @bubba
====================
Changes 2015-12-18

Added wifi USE flag to bubba-networkmanager (enabled by default)
  • This lets the ebuild define dependencies on wifi control applications and services
====================
Changes 2015-12-14

Move install location of libbubba-info-perl from 'site' (/usr/local) to 'vendor'
Add kernel source for Sakaki 1.8.0 release (gentoo 4.3.0)
  • you'll need this if you want to install additional (3th party) modules
Fix dhcpcd hook script in bubba-networkmanager
Upgrade bubba-networkmanager package status to 'release'

====================

Changes 2015-12-10

Investigated the procedure for backup and restore of system settings
  • - fixed changed paths and file names
    - fixed handling of hostname

    note: I do not recommend using this procedure. Better create a full backup of your system folders.
====================

Changes 2015-12-06

Managing fetchmail accounts would not work because of incorrect rights on the resource file.
Also, the services page could not positively identify if fetchmail was running.

Both these issues have been addressed

====================

Changes 2015-12-04

Add timezone info to apache mod_php

Change webmail link from '/pim' to '/webmail'

Added bubba-roundcube installer
  • This is a preconfigured webmail client that will drop right in to your bubba web admin pages.
Added singapore image gallery installer
  • I'm offering this as a replacement to bubba-album. Rather than using bulky MySQL this image gallery uses CSV files for storing image metadata, or optionally SQLite. Documentation can be found after install in http://b3/album/docs. For your convenience I've moved the ini file to /home/web/photos so you can access it through samba and play around with the various options.
====================
Changes 2015-11-27

Bubba networkmanager did not follow FQDN compliancy correctly, resulting in ` hostname -f ` not returning the correct value. Networkmanager would also add a second, invalid, localhost entry when switching to DHCP dynamic addressing. Apart from an update to bubba networkmanager itself, today's hotfix adds a dhcpcd hook script to address name resolving issues when using dhcp.
  • Note:a runtime dependency was added toward net-misc/dhcpcd. Your system may also have dhclient as part of the net-misc/dhcp package and I strongly advise you not to use it, because:
    • a) it allows multiple instances to run on the same interface
      b) it will not access the hook script provided by bubba-networkmanager
    If you do have net-misc/dhcp installed (default on sakaki live systems) I suggest you uninstall it. We're not using it in this environment.
====================
Changes 2015-11-24

Fix false error message in web admin when enabling easyfind

====================

Changes 2015-11-19

Fix incorrect cgi USE dependency for apache in filetransferdaemon (should have been apache2_modules_cgi)

Add USE flags to filetransferdaemon to control what should be supported:
  • allow installing without upload.cgi
  • optionally disable torrent support
Fix empty page in web admin if filetransferdaemon is not installed

Move bubba-diskmanager to /opt/bubba tree

====================

Changes 2015-11-17

Added ebuild for File Transfer Daemon
  • Why File Transfer Daemon you ask?
    Because apart from letting you download files and torrents, it also provides the upload functionality for files up to 2Gb in size. Which as far as I'm concerned is a priceless feature and if you don't like the crappy torrent client then there's nothing keeping you from installing another one as well.
====================

Changes 2015-11-16

Moved bubba-buttond to /opt/bubba tree
Installer now also adds the bubba-buttond service to the default runlevel and starts it

Sanitized check for `bubba-ized` sysvinit (determining whether write-magic flash writing application should be available within the regular path)

Fixed wlanupdate page always timing out. The only time out that is still occurring is when wifi is switched on or off. This is unavoidable and will thus remain.

Let bubba-networkmanager add rc_net_<dev>_provide="!net" config setting for bridge members.

====================

Changes 2015-11-13

Moved bubba-networkmanager to /opt/bubba tree (this involves changes to bubba-backend and bubba-frontend)

Fixed an issue with enabling/disabling automatic time updates in the web admin (service renamed)

====================

Changes 2015-11-09

Fixed hosts file corruption while switching wifi on and off through the web admin
  • Known issue: there's a lot going on when doing so and networking on the B3 will be down for about 30-40 seconds. Enough to cause the web-admin to display a timeout. Please do not reload the page with resending the information - it doesn't work. Use your browser's history.back() button instead.
Changed the version number on the optional sysvinit package to reflect its actual version rather than wrongfully identify as a rolling release.

Fixed dependency issue with bubba-backend (causing e.g. power buttons in web admin not to function)

Added kernel source ebuild for sakaki 1.7.0 release (4.1.6)

====================

Changes 2015-11-07

Finally managed to get this running. Switching wifi on and off through the web administrator changes your lan interface to either eth1 or br0. This is now functional and will show the correct data in the lan network view with either selection.

Do note that when running Sakaki's 1.7.0 version the lan interface defaults to the bridge interface br0 with eth1 as the single member. If you own a Wifi version B3 you can simply fix the networking parameters by switching wifi off and back on in the web administrator. For non-wifi versions this currently still requires some manual editing of conf files.

Gordon
Posts: 1366
Joined: 10 Aug 2011, 03:18

Re: [closed] Beta 2: Bubba web admin - build on Gentoo

Post by Gordon » 08 Jan 2016, 04:12

I'm closing this thread as I'm entering the stage of Release Candidate.

There is some final stuff to do, but all controls that I can verify behave like in the original Squeeze based system. There's just the matter of a few config files whose content is not actually controlled by the web UI or its tools, but are expected to have a certain content. Like Samba shares, email folders and settings to use by Postfix and Dovecot. I'm currently evaluating how to handle this best.

Post Reply