How to repair a Trac installation - linux

On our Trac system, two things suddenly stopped working. The first thing is the update of the "Browse Source". The second thing is the auto-fixing feature. The only solution for the first issue is to manually run the post-commit hook of the SVN repository. But than we still have the problem, that Trac doesn't close ticket anymore depending on the SVN commit message. That was working before without any issues. Ah and a third thing is that PNG images are no longer shown in the HTML preview. The user has to download the file to see it.
Is there any known bug or issue for our described problem. Or how can I update the Trac system without loosing all the information within the Trac projects (I have set up a multi project Trac system).

If all else fails, reboot the server :)
Can you give us some more info about your server and Trac setup? For example, OS and version, Trac version, plugins used, etc.
It's odd for things to suddenly quit working. If you are running a Linux system, it's possible that your server installed some updates that your system isn't fully compatible with (for example, upgrading Trac can cause some plugins to quit working properly). Check your server's logs to see if anything was updated or reconfigured around the time Trac quit working.
Also, try setting Trac's log priority to 'DEBUG' and see if the Trac logfile contains any useful error details.

The solution was the following: file permissions!
To solve the issue we used the sudo in the post-commit hooks of SVN like the following:
sudo /usr/local/bin/trac-admin /var/trac/reponame/ changeset added "reponame" $REV
And we had to allow the SVN user to run the trac-admin command using visudo:
www-data,svn ALL=(ALL) NOPASSWD: /usr/local/bin/trac-admin

Related

Vscode integrated terminal working differently than Linux terminal with git

I am running into weird issue with Vscode integrated terminal.
It cannot find a git repository, while my normal linux terminal finds it perfectly fine.
Below image clearly tells the problem. What might be the issue here?
I had the same issue and what worked for me is to disable Git: Terminal Authentication in the settings. It will prompt the username and the password in the terminal. Hope that this solution/workaround is good for other people.
From this site I found this solution/workaround:
https://github.com/microsoft/vscode/issues/136970
I have had a few strange issues with VSCode git integration versus working in the integrated terminal.
For example, sometimes the git integration in VSCode and and in the terminal disagree with each other, and sometimes the terminal's history is apparently corrupted by VS Code. See my question here: Why do I get a different git status in a shared folder when logged in on a local VM?
I haven't entirely sorted out why this occurs, so I can't guarantee that it is the same problem as you are finding, but it could be related.

Error loading extension with localization

My nw.js app suddenly stopped working on Windows 10 with the following error;
Failed to load extension from {path}. Default locale is defined but default data couldn't be loaded.
Structure & manifest
_locales
en
js/i18n.js
Manifest
"default_language": "en"
I don't know what windows has changed recently but it has been working solidly on previous versions of Windows for years. I've updated the country tag as per available language packs for windows here and chromium tags but still no luck.
According to this thread :
"I use Chrome and stopped updating it once they made tabbed-options
mandatory. I also keep my User Data folder in a non-default location.
When this bug started, I used the --single-process trick for a while
but as mwalsher said, it stopped working when they messed with the Web
Store. I used but hate the manual method outlined above, so what I did
was to simply move my User Data folder to a FAT32 partition. Problem
solved; now I can successfully install packed extensions from an older
version of Chromium, running in normal mode, to a non-default User
Data folder. Even better, thanks to a system I set up
(http://superuser.com/questions/196886/how-to-relocate-chrome-profile-but-also-make-new-links-open-with-the-relocated-p/257706#257706),
it was /extremely/ easy to change it (I had only to change a single
byte and reboot)."
..
"Change the security permissions of the temp directory might fix this
problem. On my computer, the temp directory only has 3 full control
user (My Account, System, Administrators) at beginning. I manually
give everyone full control to this folder (maybe adding list
permission only also works). However it doesn't work immediately,
until next day I restart the computer with great surprise.
..
As a workaround, --no-sandbox might work. Note that this is just as
unsafe as --single-process, so be careful when using it.
..
..
perform a "chrome://restart
Try this first:
..I restarted Chrome and tried to install it again, and now it
installed cleanly..

Version control on shared web host with Bazaar

I have a project I am going to begin co-developing on one of my web servers. Due to the nature of this kind of thing I'd like to have some version control going on. I've been searching all day for something that fits my needs and Bazaar seems the way to go, but I cannot figure out how to configure it.
My web host is Linux, without SSH (or SFTP as far as I can tell). I've read that you can use Bazaar in this situation to make a "dumb" server, but I can't for the life of me figure out how to configure, or find a guide. Everything out there requires either SSH/CLI access (both of which I don't have) or are too vague to follow. I am using the Windows GUI for Bazaar as well.
Can anyone either point me to a guide/instructions on how to do it, or post one here?
Edit Since Original Post
I have been trying to do several things since my original post. It might be that I am misunderstanding how bazaar is meant to work. What I want is to have my php files etc. on my web host (to which i do not have ssh access) so that myself and codevelopers can edit and test files without overwritting each other.
I initially tried to "start a new project" on my server via "ftp://user:pass#server" and it says that is successful. Then it prompts with a "Unable to open location" error saying "C:/ftp:/user:pass#server is not a brand, checkout, or repository.
Do you want to open it as a virtual repository, searching for nested locations?"
When I hit yes, it gives me an error "Unable to change to C:/ftp:/user:pass#server - closing page."
if I do the same thing with the "Open an existing location" option, it gives me the same error, except afterwards the Bazaar GUI hangs with "Not Responding" and needs to be killed.
Either way nothing is created that I can then interact with in Bazaar. If I create a local project and then push, it all seems to work. However, if I try to commit changes so I can push them I get an error "Bazaar has encountered an environmental error. Please report a bug if this is not the result of a local problem at https://bugs.launchpad.net/qbzr/+filebug including this traceback, and a description of what you were doing when the error occurred." the show details says "bzr: ERROR: Unable to determine your name.
Please, set your name with the 'whoami' command.
E.g. bzr whoami "Your Name ""
Before you can commit revisions, you need to set a name and email address. These are important metadata in a commit. You can set these in the Settings | Configuration | User Configuration menu. On the General tab enter the Name and E-mail fields. It's recommended to use real data in public projects, so that others who view your project can contact you in case they have questions. But it doesn't have to be real. This is a one-time initial setup.
As a next step, I would do a test to make sure you can really use your server over FTP, as a sanity check:
Commit a few revisions in your local repository, just so that you have something to push. It could be anything, doesn't matter.
Try a push to a URL in the format: ftp://user:pass#server/absolute/path/to/somewhere. In the example in your post you wrote ftp://user:pass#server, but it's important to have an absolute path there, like in this example.
If for some reason the push doesn't work well using the GUI, try it on the command line, for example:
bzr push ftp://user:pass#server/absolute/path/to/somewhere
This should really give an error message we can debug. In that case, paste the output into your question.
UPDATE
You said in comments that something was wrong with your name+email setting, and changing that resolved the problem. It would be nice to know what exactly was the problem there.
About bzr push to an FTP server, I double checked, this will never create the files on the server. From bzr push -h:
The target branch will not have its working tree populated because this
is both expensive, and is not supported on remote file systems.
Some smart servers or protocols may put the working tree in place in the future.
Over FTP it's a "dumb" server, so it definitely won't put the files there, only the .bzr directory, which is the repository and branch data. If you want to have the files there, I'm afraid you have to copy manually. There is a related bzr-push-and-update plugin, but it requires ssh access, which is not your case.

Autoupdating AIR apps on Linux without prompting for sudo password

Maybe that's more of a Linux question than an Adobe Air one, but there you go: I have an AIR 2 app that does auto-update in the background, with no need for user interaction. It uses Air's own ApplicationUpdater framework (the one that doesn't require a UI) - all goes well until the package gets downloaded and needs to be installed - at that point, the Air Installer prompts for SUDO password and won't proceed without some user interaction.
Is there any way to circumvent/avoid that?
I solved this by adding a rule to the sudoers file (/etc/sudoers)
<username> ALL=(root) NOPASSWD: /tmp/air.*/setup
This rule can enable the update to all users
ALL ALL=(root) NOPASSWD: /tmp/air.*/setup
Note that it could lead to some security issues but I think if you are going to use this as a Linux Kiosk it's going to work.
You could do that by rolling your own updating mechanism. Is not really that difficult, if you plan it correctly you don't even need to close the app.
We did so for an internal project, where we use git. Since I guess you can't rely on Git being available on the user's machine, you could check out the server, download a zip file, uncompress it and replace the contents of your app.
AIR doesn't sign or checksum the files it installs, you can safely replace them and re-load the app without problems.
HTH,
J

How do I submit a bug to Tracker, MantisBT, or Trac programatically?

I've got a program that I've been working on at home for a while, and I decided finally to throw it up on SourceForge. SourceForge offers Tracker, MantisBT, or Trac for bug tracking.
My app already has a "Sorry, an error occurred" dialog, but I'd like to add a "Complain about it" button that will submit a bug to my bug tracker. Has anyone tried to do this with Tracker? Can you submit anonymous bugs via a query string interface, or something along those lines? Or, if Tracker can't do it, how about MantisBT? Or Trac?
Programmatic access:
Mantis has a SOAP interface;
Trac has an XML-RPC interface.
If your application happens to be built on Eclipse, you can use the existing Mylyn plugins - they're both offered with 1-click install since version 3.2 (reference).
Also, Mantis 1.1.x (and perhaps later 1.2.x) has a php script (core/checkin.php) that can be called from a post-commit hook when the repo and mantis live on the same host. You just need to provide the glue for the hook, e.g. bash, and either commit all notes as a user defined 'vcs' userame or make a small modification to the php to determine the user making the commit.
In the later 1.1.x versions there is a checkincurl.php that will address usage when mantis and the repo are not collocated.

Resources